From ede86e4da834193d1ae43b0cd48386c53374714f Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 11 Nov 1998 21:27:21 +0000 Subject: [PATCH] Memory leaks: Values from ldap_dn2ufn and ldap_get_dn were not freed. --- contrib/whois++/describe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/whois++/describe.c b/contrib/whois++/describe.c index eb019fed70..94813d9370 100644 --- a/contrib/whois++/describe.c +++ b/contrib/whois++/describe.c @@ -182,11 +182,13 @@ according to the IAFA services template." ); ldap_value_free( values ); } else { #endif - value = strdup( ldap_dn2ufn( ldap_get_dn( ld, result ) ) ); + value = ldap_dn2ufn( ptr = ldap_get_dn( ld, result ) ); + free( ptr ); if ( (ptr = index( value, ',' )) != NULL ) *ptr = '\0'; printFormatted( lineLength, FALSE, stdout, "%-19s %s", "Contact:", value ); + free( value ); #if defined(UOFA) } #endif -- 2.39.5