]> git.sur5r.net Git - openldap/commitdiff
Fix rev 1.270: free def_urlpre correctly. Also free urlpre.
authorHallvard Furuseth <hallvard@openldap.org>
Sat, 4 Dec 2010 18:53:04 +0000 (18:53 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sat, 4 Dec 2010 18:53:04 +0000 (18:53 +0000)
clients/tools/ldapsearch.c

index 630626c6f0eb69dc096848fb012efea97a68df28..9a4492ad386178de0ba10c6ce6eab370b24124f6 100644 (file)
@@ -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;
 }
-