Mercurial > hg > mlmmj
changeset 564:8de4095ec6ea
fixed a few (of mmj's) leaks :)
author | mortenp |
---|---|
date | Mon, 04 Sep 2006 07:29:05 +1000 |
parents | 9f6c46b77910 |
children | e3a9ca0e9c33 |
files | src/mlmmj-maintd.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mlmmj-maintd.c Mon Sep 04 07:21:38 2006 +1000 +++ b/src/mlmmj-maintd.c Mon Sep 04 07:29:05 2006 +1000 @@ -233,11 +233,14 @@ 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 @@ t = time(NULL); if(t - st.st_mtime > bouncelife) { unlink(mailname); + myfree(mailname); continue; }