From de67e6d32761fc1dbf8144efca995d94e09380a6 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 23 Jul 1999 22:02:57 +0000 Subject: [PATCH] Fix leak of default filter. --- libraries/libldap/url.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index 4f0a5635f2..57c4391c80 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -210,6 +210,7 @@ ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) ludp->lud_filter = NULL; ludp->lud_ldaps = ldaps; ludp->lud_scope = LDAP_SCOPE_BASE; + ludp->lud_filter = LDAP_STRDUP("(objectClass=*)"); if( ludp->lud_filter == NULL ) { @@ -359,6 +360,7 @@ ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) return LDAP_URL_ERR_BADFILTER; } + LDAP_FREE( ludp->lud_filter ); ludp->lud_filter = LDAP_STRDUP( p ); if( ludp->lud_filter == NULL ) { -- 2.39.5