summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-11-13 08:32:23 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-11-14 19:41:18 +0100
commita7767459b4c7fea7022db0f468730ba3fceec679 (patch)
tree11ab18372aef8e4772d5e4aa5f07a21937aa6217
parent7d8d8854d0e2bc7a038a87ea6b69b5da01128fc3 (diff)
downloadsssd-a7767459b4c7fea7022db0f468730ba3fceec679.tar.gz
sssd-a7767459b4c7fea7022db0f468730ba3fceec679.tar.xz
sssd-a7767459b4c7fea7022db0f468730ba3fceec679.zip
LDAP: Prevent from using uninitialized sdap_options
ldap_get_options can fail in time of ldap back end initialisation and then sssd try to release uninitialised sdap_options. Resolves: https://fedorahosted.org/sssd/ticket/2147
-rw-r--r--src/providers/ldap/ldap_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index 17874b132..15615b289 100644
--- a/src/providers/ldap/ldap_init.c
+++ b/src/providers/ldap/ldap_init.c
@@ -94,7 +94,7 @@ int sssm_ldap_id_init(struct be_ctx *bectx,
const char *dns_service_name;
const char *sasl_mech;
struct sdap_service *sdap_service;
- struct sdap_options *opts;
+ struct sdap_options *opts = NULL;
int ret;
/* If we're already set up, just return that */