From e16ab3b5bb0168f352598526f69430ee500cb6ac Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 11 Dec 2015 12:30:32 +0100 Subject: fix a memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/scrotty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/scrotty.c b/src/scrotty.c index 5c7379d..5624e28 100644 --- a/src/scrotty.c +++ b/src/scrotty.c @@ -388,7 +388,7 @@ save_fb (int fbno, int raw, const char *filepattern, const char *execpattern) /* Should we run a command over the image? */ if (execpattern == NULL) - return 0; + goto done; /* Get execute arguments. */ execargs = evaluate (execpattern, fbno, width, height, imgpath); @@ -399,12 +399,12 @@ save_fb (int fbno, int raw, const char *filepattern, const char *execpattern) if (exec_image (execargs) < 0) goto fail; - goto cleanup; + goto done; fail: saved_errno = errno; rc = -1; - cleanup: + done: free (execargs); if (imgpath != imgpath_) free (imgpath); -- cgit v1.2.3-70-g09d2