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 );
skip:
/* disconnect from server */
+ if ( res )
+ ldap_msgfree( res );
tool_unbind( ld );
tool_destroy();