From e0adc1aa698c1828c68c4991001a718061134b09 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 4 Dec 2010 18:53:04 +0000 Subject: [PATCH] Fix rev 1.270: free def_urlpre correctly. Also free urlpre. --- clients/tools/ldapsearch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 630626c6f0..9a4492ad38 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1350,8 +1350,10 @@ getNextPage: if ( derefval.bv_val != NULL ) { ldap_memfree( derefval.bv_val ); } - if ( def_urlpre != NULL ) { - ber_memfree( def_urlpre ); + if ( urlpre != NULL ) { + if ( def_urlpre != urlpre ) + free( def_urlpre ); + free( urlpre ); } if ( c ) { @@ -1906,4 +1908,3 @@ static int print_result( return err; } - -- 2.39.5