From: Quanah Gibson-Mount Date: Tue, 4 Jan 2011 19:25:58 +0000 (+0000) Subject: Plug one-time LDAPMessage leak X-Git-Tag: OPENLDAP_REL_ENG_2_4_24~147 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cdce7a01afba954fcf64aaa30eec4d7d19b06cde;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();