Skip to content
Snippets Groups Projects
Commit cb8b23ef authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Plug memory leaks

parent 17fe0f59
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment