From b545ab01c7a6f0ef5fae516740f6d7dace8dc5c3 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 25 Apr 2001 01:43:26 +0000 Subject: [PATCH] ITS#1125: fix memory leak based upon patch provided by Dmitri.Belotchkine@AtosOrigin.com --- libraries/libldap/open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index b5cf355a0f..b04985aadb 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -54,7 +54,8 @@ ldap_open( char *host, int port ) } if ( ldap_delayed_open( ld ) < 0 ) { - return( NULL ); + ldap_ld_free( ld, 0 ); + return NULL; } Debug( LDAP_DEBUG_TRACE, "ldap_open successful, ld_host is %s\n", -- 2.39.5