aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-12-07 15:05:37 +0100
committerMattias Andrée <maandree@operamail.com>2015-12-07 15:05:37 +0100
commit0d1ce8321cb7a56fb9b9d84154c2efac76282080 (patch)
tree32a6ebf14af0eb7f17c754ef8abdf73cae76223d
parentmove dist files (diff)
downloadscrotty-0d1ce8321cb7a56fb9b9d84154c2efac76282080.tar.gz
scrotty-0d1ce8321cb7a56fb9b9d84154c2efac76282080.tar.bz2
scrotty-0d1ce8321cb7a56fb9b9d84154c2efac76282080.tar.xz
Close the file when not using convert
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/scrotty.c1
1 files changed, 1 insertions, 0 deletions
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;
}