Blob Blame History Raw
From 5eea6f1e7a43bdd63a1530fb9c68ef292f431f4f Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Wed, 13 Nov 2013 08:32:23 +0100
Subject: [PATCH 12/12] 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
---
 src/providers/ldap/ldap_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index 17874b1325d3e5bf2eded62c6f022364b84a5c2a..15615b2891f2e3104c11e8610c081adcd1d1ee8e 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 */
-- 
1.8.4.2