mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Plug memory leaks
This commit is contained in:
parent
17fe0f59f8
commit
cb8b23efb2
@ -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 == ',' );
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user