From c6ef9db927d48062fcfd1ba43ad9fd4bbbb5a63c Mon Sep 17 00:00:00 2001 From: "\"John Hawthorn ext:(%22)" Date: Wed, 31 Dec 2008 18:00:06 -0800 Subject: minor bug --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 57d8723..903ec1a 100644 --- a/src/main.c +++ b/src/main.c @@ -284,9 +284,12 @@ void readlist(FILE *f){ char *line = NULL; size_t slen = 0; ssize_t read; - if((read = getline(&line, &slen, f)) > 0){ + read = getline(&line, &slen, f); + if(read > 1){ line[read-1] = '\0'; images[imageslen++] = line; + }else if(line){ + free(line); } } lsize *= 2; -- cgit v1.2.3