From: Kurt Zeilenga Date: Wed, 25 Apr 2001 01:43:26 +0000 (+0000) Subject: ITS#1125: fix memory leak X-Git-Tag: OPENLDAP_REL_ENG_1_2_12~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b545ab01c7a6f0ef5fae516740f6d7dace8dc5c3;p=thirdparty%2Fopenldap.git ITS#1125: fix memory leak based upon patch provided by Dmitri.Belotchkine@AtosOrigin.com --- 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",