mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
fix: segfault in 'edit_save_confirm_cmd', g_free non allocated memory
This commit is contained in:
parent
ad2eb8877b
commit
3236fe285c
@ -776,7 +776,7 @@ int edit_load_macro_cmd (WEdit * edit, struct macro macro[], int *n, int k)
|
|||||||
/* returns 1 on success */
|
/* returns 1 on success */
|
||||||
int edit_save_confirm_cmd (WEdit * edit)
|
int edit_save_confirm_cmd (WEdit * edit)
|
||||||
{
|
{
|
||||||
gchar *f;
|
gchar *f = NULL;
|
||||||
|
|
||||||
if (edit_confirm_save) {
|
if (edit_confirm_save) {
|
||||||
f = g_strconcat (_(" Confirm save file? : "), edit->filename, " ", NULL);
|
f = g_strconcat (_(" Confirm save file? : "), edit->filename, " ", NULL);
|
||||||
@ -784,8 +784,8 @@ int edit_save_confirm_cmd (WEdit * edit)
|
|||||||
g_free(f);
|
g_free(f);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
g_free(f);
|
||||||
}
|
}
|
||||||
g_free(f);
|
|
||||||
return edit_save_cmd (edit);
|
return edit_save_cmd (edit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user