]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#1125: fix memory leak
authorKurt Zeilenga <kurt@openldap.org>
Wed, 25 Apr 2001 01:43:26 +0000 (01:43 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 25 Apr 2001 01:43:26 +0000 (01:43 +0000)
 based upon patch provided by Dmitri.Belotchkine@AtosOrigin.com

libraries/libldap/open.c

index b5cf355a0fa338eef8b0c284b07463c6589870c7..b04985aadbb88719da9ceb4dced1f34804d58d92 100644 (file)
@@ -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",