From 9cc5c6295f1af26d2aa6120a8ca56aff85a3acd6 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 31 Mar 2006 09:18:38 +0000 Subject: [PATCH] Plug leaks --- tests/progs/slapd-tester.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 ); -- 2.39.5