mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 04:04:07 -06:00
Eliminate double free of memory by just freeing default_dir once at
the end of the function. The gnc_extract_directory() routine will handle any intermediate freeing if called multiple times. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11906 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
817dd3687f
commit
12c39d5492
@ -1,5 +1,10 @@
|
||||
2005-11-11 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/import-export/log-replay/gnc-log-replay.c: Eliminate double
|
||||
free of memory by just freeing default_dir once at the end of the
|
||||
function. The gnc_extract_directory() routine will handle any
|
||||
intermediate freeing if called multiple times.
|
||||
|
||||
* src/app-utils/file-utils.[ch]:
|
||||
* src/app-utils/guile-util.[ch]:
|
||||
* src/business/business-gnome/gnc-plugin-business.c:
|
||||
|
@ -514,14 +514,12 @@ void gnc_file_log_replay (void)
|
||||
NULL,
|
||||
default_dir,
|
||||
GNC_FILE_DIALOG_OPEN);
|
||||
g_free(default_dir);
|
||||
|
||||
if(selected_filename!=NULL)
|
||||
{
|
||||
/* Remember the directory as the default. */
|
||||
gnc_extract_directory(&default_dir, selected_filename);
|
||||
gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
|
||||
g_free(default_dir);
|
||||
|
||||
/*strncpy(file,selected_filename, 255);*/
|
||||
DEBUG("Filename found: %s",selected_filename);
|
||||
@ -562,7 +560,7 @@ void gnc_file_log_replay (void)
|
||||
}
|
||||
g_free(selected_filename);
|
||||
}
|
||||
|
||||
g_free(default_dir);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user