diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-17 12:31:02 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-17 12:31:02 +0000 |
commit | b99357616cebe750e523f123701f284d7ac0037f (patch) | |
tree | b81509e472b11658ec4c960cb80bf067880b7334 | |
parent | 143f28572af65aaabd084cc7b46dbfc5ab766b06 (diff) | |
download | netsurf-b99357616cebe750e523f123701f284d7ac0037f.tar.gz netsurf-b99357616cebe750e523f123701f284d7ac0037f.tar.bz2 |
Fix unchecked return. Coverity #1175740.
-rw-r--r-- | desktop/browser_history.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/browser_history.c b/desktop/browser_history.c index c52f01c1a..ca551f75d 100644 --- a/desktop/browser_history.c +++ b/desktop/browser_history.c @@ -712,9 +712,13 @@ void browser_window_history_go(struct browser_window *bw, current = history->current; history->current = entry; - browser_window_create(BW_CREATE_CLONE, + error = browser_window_create(BW_CREATE_CLONE, url, NULL, bw, NULL); history->current = current; + if (error != NSERROR_OK) { + nsurl_unref(url); + return; + } } else { history->current = entry; browser_window_navigate(bw, url, NULL, |