From 3f09968e5f3ed1329f42df41719a7ac0cea7a03f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 31 Mar 2006 13:09:42 +0000 Subject: [PATCH] cleanup --- clients/tools/ldapsearch.c | 3 +++ clients/tools/ldapwhoami.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 ); -- 2.39.5