From cef31a77a71b9ad899e412cea3915d84fd3fc367 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 8 Jan 2011 12:49:21 +0000 Subject: [PATCH] make sure msg is freed --- clients/tools/ldapwhoami.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/tools/ldapwhoami.c b/clients/tools/ldapwhoami.c index b8d8f3718b..12be137f4b 100644 --- a/clients/tools/ldapwhoami.c +++ b/clients/tools/ldapwhoami.c @@ -182,7 +182,6 @@ main( int argc, char *argv[] ) } rc = ldap_parse_whoami( ld, res, &authzid ); - ldap_msgfree(res); if( rc != LDAP_SUCCESS ) { tool_perror( "ldap_parse_whoami", rc, NULL, NULL, NULL, NULL ); @@ -199,6 +198,7 @@ main( int argc, char *argv[] ) } skip: + ldap_msgfree(res); if ( verbose || ( code != LDAP_SUCCESS ) || matcheddn || text || refs || ctrls ) { -- 2.39.5