summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Klemkow <j.klemkow@wemelug.de>2013-02-01 15:54:38 +0100
committerJan Klemkow <j.klemkow@wemelug.de>2013-02-01 15:54:38 +0100
commit774fcd4d9ec43b76352910eb4e7a620916b0052b (patch)
tree8d03bde1e955e06064e87223d98005abd6a07606 /src
parentcb49d38032bd9b1ba8cac62026df15d906db4248 (diff)
downloadadvtime-774fcd4d9ec43b76352910eb4e7a620916b0052b.tar.gz
advtime-774fcd4d9ec43b76352910eb4e7a620916b0052b.tar.bz2
advtime-774fcd4d9ec43b76352910eb4e7a620916b0052b.zip
fix filedescriptor leak
Diffstat (limited to 'src')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index ddb3ce9..f61bdbd 100644
--- a/src/util.c
+++ b/src/util.c
@@ -20,7 +20,7 @@ pgm_read(char *filename, unsigned char **buf, int *xsize, int *ysize)
return -1;
if (fscanf(f, "P5\n%d %d\n255\n", &width, &height) == 0)
- return -1;
+ goto fail;
if (width * height <= 0)
goto fail;