From: Richard Mortimer Date: Tue, 25 Jan 2011 16:46:52 +0000 (+0000) Subject: Ensure that filename is always freed in clean_nolongerbouncing() X-Git-Tag: RELEASE_1_2_18a1~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91e417bbf7341efb98d912e1d54ed2e27e518906;p=thirdparty%2Fmlmmj.git Ensure that filename is always freed in clean_nolongerbouncing() --- diff --git a/src/mlmmj-maintd.c b/src/mlmmj-maintd.c index b986fcf1..f94f13b0 100644 --- a/src/mlmmj-maintd.c +++ b/src/mlmmj-maintd.c @@ -532,11 +532,15 @@ int clean_nolongerbouncing(const char *listdir) } probefd = open(filename, O_RDONLY); - if(probefd < 0) + if(probefd < 0) { + myfree(filename); continue; + } probetimestr = mygetline(probefd); - if(probetimestr == NULL) + if(probetimestr == NULL) { + myfree(filename); continue; + } close(probefd); chomp(probetimestr); probetime = (time_t)strtol(probetimestr, NULL, 10);