From: Hallvard Furuseth Date: Mon, 23 Nov 1998 04:35:26 +0000 (+0000) Subject: Plug memory leaks X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~1033 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cb8b23efb2020773d1b6761918699e21ebc7ddef;p=openldap Plug memory leaks --- diff --git a/servers/slapd/schemaparse.c b/servers/slapd/schemaparse.c index 96e01f09b0..08640bda5e 100644 --- a/servers/slapd/schemaparse.c +++ b/servers/slapd/schemaparse.c @@ -36,9 +36,10 @@ parse_oc( do { i++; if ( i < argc ) { + char **s = str2charray( argv[i], "," ); last = argv[i][strlen( argv[i] ) - 1]; - charray_merge( &oc->oc_required, - str2charray( argv[i], "," ) ); + charray_merge( &oc->oc_required, s ); + charray_free( s ); } } while ( i < argc && last == ',' ); @@ -47,9 +48,11 @@ parse_oc( do { i++; if ( i < argc ) { + char **s = str2charray( argv[i], "," ); last = argv[i][strlen( argv[i] ) - 1]; - charray_merge( &oc->oc_allowed, - str2charray( argv[i], "," ) ); + + charray_merge( &oc->oc_allowed, s ); + charray_free( s ); } } while ( i < argc && last == ',' ); diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index 4c802e1f44..5e709dc9bc 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -270,6 +270,7 @@ main( int argc, char **argv ) data = ldbm_fetch( db->dbc_db, key ); + free( dn ); if ( data.dptr == NULL ) { dn_normalize( val ); if ( ! be_issuffix( be,