From: mortenp Date: Sun, 3 Sep 2006 21:29:05 +0000 (+1000) Subject: fixed a few (of mmj's) leaks :) X-Git-Tag: RELEASE_1_2_12_RC1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8557a0f2aabf645b9dc4a63f96ac182f9d628883;p=thirdparty%2Fmlmmj.git fixed a few (of mmj's) leaks :) --- diff --git a/src/mlmmj-maintd.c b/src/mlmmj-maintd.c index b6bd7d6d..6108c6d2 100644 --- a/src/mlmmj-maintd.c +++ b/src/mlmmj-maintd.c @@ -233,11 +233,14 @@ int resend_queue(const char *listdir, const char *mlmmjsend) if(stat(mailname, &st) < 0) { log_error(LOG_ARGS, "Could not stat(%s)", mailname); + myfree(mailname); continue; } - if(!S_ISREG(st.st_mode)) + if(!S_ISREG(st.st_mode)) { + myfree(mailname); continue; + } if(strchr(dp->d_name, '.')) { ch = strrchr(mailname, '.'); @@ -309,6 +312,7 @@ int resend_queue(const char *listdir, const char *mlmmjsend) t = time(NULL); if(t - st.st_mtime > bouncelife) { unlink(mailname); + myfree(mailname); continue; }