From 6ffab5885de60e984d7e82615a0d47588b2e428d Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 2 Jan 2015 15:24:40 +0000 Subject: Don't free temp_path just before its used. --- desktop/hotlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'desktop') diff --git a/desktop/hotlist.c b/desktop/hotlist.c index 661ea2e75..512eb3ae3 100644 --- a/desktop/hotlist.c +++ b/desktop/hotlist.c @@ -784,13 +784,14 @@ static nserror hotlist_load(const char *path, bool *loaded) /* Load hotlist file */ err = libdom_parse_file(path, "iso-8859-1", &document); - free(temp_path); if (err != NSERROR_OK) { err = libdom_parse_file(temp_path, "iso-8859-1", &document); if (err != NSERROR_OK) { + free(temp_path); return err; } } + free(temp_path); /* Find HTML element */ html = libdom_find_first_element((dom_node *) document, -- cgit v1.2.3