From 4086117d9c11deb46992e6487fd1764eb0207c64 Mon Sep 17 00:00:00 2001 From: David Crosby Date: Thu, 9 Jul 2015 20:47:34 -0600 Subject: Fix resource leak --- frame.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'frame.c') 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) -- cgit v1.2.3