Plug memory leaks

This commit is contained in:
Hallvard Furuseth 1998-11-23 04:35:26 +00:00
parent 17fe0f59f8
commit cb8b23efb2
2 changed files with 8 additions and 4 deletions

View File

@ -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 == ',' );

View File

@ -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,