Fix blatent use-after-free bug.

svn path=/trunk/netsurf/; revision=9712
This commit is contained in:
John Mark Bell 2009-12-03 22:10:56 +00:00
parent d88945bc0b
commit f6fbe6ef96
1 changed files with 3 additions and 3 deletions

View File

@ -331,13 +331,13 @@ bool ro_gui_hotlist_dialog_apply(wimp_w w)
/* check for lack of text */
if (title == NULL || title[0] == '\0') {
free(url);
free(title);
node = NULL;
if (title == NULL)
warn_user("NoMemory", 0);
else if (title[0] == '\0')
warn_user("NoNameError", 0);
free(url);
free(title);
node = NULL;
return false;
}
ro_gui_set_icon_string(w, url ? ICON_ENTRY_NAME : ICON_FOLDER_NAME,