]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
fixed a few (of mmj's) leaks :)
authormortenp <none@none>
Sun, 3 Sep 2006 21:29:05 +0000 (07:29 +1000)
committermortenp <none@none>
Sun, 3 Sep 2006 21:29:05 +0000 (07:29 +1000)
src/mlmmj-maintd.c

index b6bd7d6d1f662652f6f6175e582747d2d456268f..6108c6d2c1b8fe21ec8adb8ecd619bce8b117def 100644 (file)
@@ -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;
                }