From 2e6bc30fc70622077b594322b1c02081a095ea04 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Mon, 30 Jun 2014 16:42:54 +0200 Subject: [PATCH] openldap: fix leak when reading from server fails --- src/openldap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openldap.c b/src/openldap.c index 166dcec3..f284a191 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -328,6 +328,7 @@ static int init_host (ldap_t *st) ERROR ("openldap plugin: Failed to start tls on %s: %s", st->url, ldap_err2string (rc)); st->state = 0; + ldap_destroy(st->ld); return (-1); } } @@ -342,6 +343,7 @@ static int init_host (ldap_t *st) ERROR ("openldap plugin: Failed to bind to %s: %s", st->url, ldap_err2string (rc)); st->state = 0; + ldap_destroy(st->ld); return (-1); } else -- 2.30.2