diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 7eda37d8d9..a85e741190 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1070,6 +1070,9 @@ static int dosearch( } if ( dont ) { + if ( filtpatt != NULL ) { + free( filter ); + } return LDAP_SUCCESS; } diff --git a/clients/tools/ldapwhoami.c b/clients/tools/ldapwhoami.c index 7f27817be3..17d48b28e3 100644 --- a/clients/tools/ldapwhoami.c +++ b/clients/tools/ldapwhoami.c @@ -116,7 +116,7 @@ main( int argc, char *argv[] ) char *matcheddn = NULL, *text = NULL, **refs = NULL; char *retoid = NULL; struct berval *retdata = NULL; - int id, code; + int id, code = 0; LDAPMessage *res; tool_init( TOOL_WHOAMI );