aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Crosby <dave@dafyddcrosby.com>2015-07-10 02:47:34 +0000
committerTatsuya Kinoshita <tats@debian.org>2015-08-11 12:59:27 +0000
commit4086117d9c11deb46992e6487fd1764eb0207c64 (patch)
tree430f7f30f7e7b6e458423e7fd1c9ba18de1305e6
parentFix resource leak (diff)
downloadw3m-4086117d9c11deb46992e6487fd1764eb0207c64.tar.gz
w3m-4086117d9c11deb46992e6487fd1764eb0207c64.zip
Fix resource leak
-rw-r--r--frame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/frame.c b/frame.c
index 48c2d72..c595c40 100644
--- a/frame.c
+++ b/frame.c
@@ -895,8 +895,10 @@ renderFrame(Buffer *Cbuf, int force_reload)
/*
* if (Cbuf->frameQ != NULL) fset = Cbuf->frameQ->frameset; else */
fset = Cbuf->frameset;
- if (fset == NULL || createFrameFile(fset, f, Cbuf, 0, force_reload) < 0)
+ if (fset == NULL || createFrameFile(fset, f, Cbuf, 0, force_reload) < 0) {
+ fclose(f);
return NULL;
+ }
fclose(f);
flag = RG_FRAME;
if ((Cbuf->currentURL).is_nocache)