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

strdup/free li->li_directory when chaning, so unmalloced version won't be freed

parent 47f9f7e7
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ ldbm_back_db_config(
fname, lineno );
return( 1 );
}
if ( li->li_directory )
free( li->li_directory );
li->li_directory = ch_strdup( argv[1] );
li->li_nextid_file =
......
......@@ -106,7 +106,7 @@ ldbm_back_db_init(
li->li_mode = DEFAULT_MODE;
/* default database directory */
li->li_directory = DEFAULT_DB_DIRECTORY;
li->li_directory = ch_strdup( DEFAULT_DB_DIRECTORY );
/* always index dn, id2children, objectclass (used in some searches) */
argv[ 0 ] = "dn";
......
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