From: Kurt Zeilenga Date: Fri, 23 Jul 1999 22:02:57 +0000 (+0000) Subject: Fix leak of default filter. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=de67e6d32761fc1dbf8144efca995d94e09380a6;p=openldap Fix leak of default filter. --- 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 ) {