From: Howard Chu Date: Fri, 31 Mar 2006 09:18:38 +0000 (+0000) Subject: Plug leaks X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~89 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9cc5c6295f1af26d2aa6120a8ca56aff85a3acd6;p=openldap Plug leaks --- diff --git a/tests/progs/slapd-tester.c b/tests/progs/slapd-tester.c index a430a45277..03d47f3c21 100644 --- a/tests/progs/slapd-tester.c +++ b/tests/progs/slapd-tester.c @@ -730,11 +730,14 @@ get_read_entries( char *filename, char *entries[], char *filters[] ) LDAPURLDesc *lud; if ( ldap_url_parse( &line[1], &lud ) != LDAP_URL_SUCCESS ) { - return -1; + entry = -1; + break; } if ( lud->lud_dn == NULL || lud->lud_dn[ 0 ] == '\0' ) { - return -1; + ldap_free_urldesc( lud ); + entry = -1; + break; } entries[entry] = ArgDup( lud->lud_dn ); @@ -745,7 +748,7 @@ get_read_entries( char *filename, char *entries[], char *filters[] ) } else { filters[entry] = ArgDup( "(objectClass=*)" ); } - + ldap_free_urldesc( lud ); } else { entries[entry] = ArgDup( line );