From: Hallvard Furuseth Date: Mon, 20 Dec 2010 12:39:48 +0000 (+0000) Subject: Plug one-time LDAPMessage leak X-Git-Tag: MIGRATION_CVS2GIT~342 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=77a7ef0adf8889c90f7a3f8e7a4594445d87da3f;p=openldap Plug one-time LDAPMessage leak --- diff --git a/clients/tools/ldapexop.c b/clients/tools/ldapexop.c index 095d5e3376..b259bef03c 100644 --- a/clients/tools/ldapexop.c +++ b/clients/tools/ldapexop.c @@ -75,7 +75,7 @@ main( int argc, char *argv[] ) char *matcheddn = NULL, *text = NULL, **refs = NULL; LDAPControl **ctrls = NULL; int id, code; - LDAPMessage *res; + LDAPMessage *res = NULL; tool_init( TOOL_EXOP ); prog = lutil_progname( "ldapexop", argc, argv ); @@ -348,6 +348,8 @@ main( int argc, char *argv[] ) skip: /* disconnect from server */ + if ( res ) + ldap_msgfree( res ); tool_unbind( ld ); tool_destroy();