From 0d1ce8321cb7a56fb9b9d84154c2efac76282080 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 7 Dec 2015 15:05:37 +0100 Subject: Close the file when not using convert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/scrotty.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/scrotty.c b/src/scrotty.c index 591db78..7a0e31b 100644 --- a/src/scrotty.c +++ b/src/scrotty.c @@ -237,6 +237,7 @@ static int save(const char* fbpath, const char* imgpath, long width, long height if (save_pnm(fbpath, width, height, fd) < 0) return saved_errno = errno, close(fd), errno = saved_errno, -1; + close(fd); return 0; } -- cgit v1.2.3-70-g09d2