dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0123-SYSDB-Fix-uninitialized-scalar-variable.patch

b2d430
From d6ecd69f63496446d23252426de41523ebe2bbf6 Mon Sep 17 00:00:00 2001
b2d430
From: Lukas Slebodnik <lslebodn@redhat.com>
b2d430
Date: Mon, 29 Aug 2016 09:13:49 +0200
b2d430
Subject: [PATCH 123/126] SYSDB: Fix uninitialized scalar variable
b2d430
MIME-Version: 1.0
b2d430
Content-Type: text/plain; charset=UTF-8
b2d430
Content-Transfer-Encoding: 8bit
b2d430
b2d430
The boolean variable newly_created could be used uninitialized
b2d430
in done section in case of failure. The variable was firstly initialized
b2d430
to true after succesfull execution of function sysdb_cache_create_empty.
b2d430
b2d430
Uninitialized variable usually means true for boolean variable.
b2d430
b2d430
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
b2d430
---
b2d430
 src/db/sysdb_init.c | 2 +-
b2d430
 1 file changed, 1 insertion(+), 1 deletion(-)
b2d430
b2d430
diff --git a/src/db/sysdb_init.c b/src/db/sysdb_init.c
b2d430
index c387c1b12c116f38d5a13f1adeac5ef64d593af8..d110aa7a2878e47650db177cfd342d0ac32248ab 100644
b2d430
--- a/src/db/sysdb_init.c
b2d430
+++ b/src/db/sysdb_init.c
b2d430
@@ -545,7 +545,7 @@ static errno_t sysdb_cache_connect_helper(TALLOC_CTX *mem_ctx,
b2d430
     const char *version = NULL;
b2d430
     int ret;
b2d430
     struct ldb_context *ldb;
b2d430
-    bool newly_created;
b2d430
+    bool newly_created = false;
b2d430
 
b2d430
     tmp_ctx = talloc_new(NULL);
b2d430
     if (!tmp_ctx) {
b2d430
-- 
b2d430
2.4.11
b2d430