diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2016-08-29 09:13:49 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2016-08-29 09:33:34 +0200 |
commit | 975d0b67a40847265523d195438bf4753d18ff1c (patch) | |
tree | 22828d8cfab1a00a039aa3ad9aedb7afda834e32 | |
parent | 69e8b7fcb9e3dc814a9ffc2a97fa656521cc4505 (diff) | |
download | sssd-975d0b67a40847265523d195438bf4753d18ff1c.tar.gz sssd-975d0b67a40847265523d195438bf4753d18ff1c.tar.xz sssd-975d0b67a40847265523d195438bf4753d18ff1c.zip |
SYSDB: Fix uninitialized scalar variable
The boolean variable newly_created could be used uninitialized
in done section in case of failure. The variable was firstly initialized
to true after succesfull execution of function sysdb_cache_create_empty.
Uninitialized variable usually means true for boolean variable.
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
-rw-r--r-- | src/db/sysdb_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/sysdb_init.c b/src/db/sysdb_init.c index c387c1b12..d110aa7a2 100644 --- a/src/db/sysdb_init.c +++ b/src/db/sysdb_init.c @@ -545,7 +545,7 @@ static errno_t sysdb_cache_connect_helper(TALLOC_CTX *mem_ctx, const char *version = NULL; int ret; struct ldb_context *ldb; - bool newly_created; + bool newly_created = false; tmp_ctx = talloc_new(NULL); if (!tmp_ctx) { |