summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-01-02 15:24:40 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2015-01-02 15:34:08 +0000
commit6ffab5885de60e984d7e82615a0d47588b2e428d (patch)
tree08b2c1baebb1b3733bbde62cbd2569e2c7cfc263 /desktop
parent94bcb4611834b13e01b51cc8a677bf7ef93eaf0b (diff)
downloadnetsurf-6ffab5885de60e984d7e82615a0d47588b2e428d.tar.gz
netsurf-6ffab5885de60e984d7e82615a0d47588b2e428d.tar.bz2
Don't free temp_path just before its used.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/hotlist.c3
1 files changed, 2 insertions, 1 deletions
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,