Skip to content
Snippets Groups Projects
Commit cdce7a01 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Plug one-time LDAPMessage leak

parent 9a273ca8
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ main( int argc, char *argv[] ) ...@@ -75,7 +75,7 @@ main( int argc, char *argv[] )
char *matcheddn = NULL, *text = NULL, **refs = NULL; char *matcheddn = NULL, *text = NULL, **refs = NULL;
LDAPControl **ctrls = NULL; LDAPControl **ctrls = NULL;
int id, code; int id, code;
LDAPMessage *res; LDAPMessage *res = NULL;
tool_init( TOOL_EXOP ); tool_init( TOOL_EXOP );
prog = lutil_progname( "ldapexop", argc, argv ); prog = lutil_progname( "ldapexop", argc, argv );
...@@ -348,6 +348,8 @@ main( int argc, char *argv[] ) ...@@ -348,6 +348,8 @@ main( int argc, char *argv[] )
skip: skip:
/* disconnect from server */ /* disconnect from server */
if ( res )
ldap_msgfree( res );
tool_unbind( ld ); tool_unbind( ld );
tool_destroy(); tool_destroy();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment