summaryrefslogtreecommitdiff
path: root/riscos/hotlist.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-12-03 22:10:56 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-12-03 22:10:56 +0000
commitf6fbe6ef962ed94a781ce540a257fdffefead800 (patch)
treedbf721ee77493b79ce3d1b35fe5d22fc49daa4ff /riscos/hotlist.c
parentd88945bc0b913b332377fd99c6f1da3351681f91 (diff)
downloadnetsurf-f6fbe6ef962ed94a781ce540a257fdffefead800.tar.gz
netsurf-f6fbe6ef962ed94a781ce540a257fdffefead800.tar.bz2
Fix blatent use-after-free bug.
svn path=/trunk/netsurf/; revision=9712
Diffstat (limited to 'riscos/hotlist.c')
-rw-r--r--riscos/hotlist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index 359268243..9989aa76e 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -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,