]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
More memory debugging, and small bugfixes
authormmj <none@none>
Fri, 11 Jun 2004 10:26:58 +0000 (20:26 +1000)
committermmj <none@none>
Fri, 11 Jun 2004 10:26:58 +0000 (20:26 +1000)
ChangeLog
README
TODO
VERSION
include/log_error.h
src/log_error.c
src/mlmmj-bounce.c
src/mlmmj-maintd.c
src/mlmmj-sub.c
src/mlmmj-unsub.c

index eeab549a323362026ab4f958a68cccf500c5b593..15491173a37d77c1e932dc61a93c81012f7dc5cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+ o More memory debugging
 0.7.1
  o Fix bug with .reciptto and .mailfrom getting swapped
  o Plug a few small memory leaks in mlmmj-maintd
diff --git a/README b/README
index 6983ea4b66cb7ddd2d2355a41817d70c05183ec9..76b3c819caac49427bfe185295a3f73ff294a660 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README mlmmj-0.7.0                                     Jun 9th 2004
+README mlmmj-0.7.1                                     Jun 10th 2004
 
 This is an attempt at implementing a mailing list manager with the same
 functionality as the brilliant ezmlm, but with a decent license and mail server
@@ -60,10 +60,7 @@ To use mlmmj, do the following:
     NOTE: Don't forget newaliases.
 
  4) Start mlmmj-maintd (remember full path when starting it!) or add it to
-    crontab with -F switch. If using it in daemon mode, keep an eye on it
-    everyonce in a while to check it's running, or to make sure it's not turning
-    into a memory hog. In the case it should happen, please tell us!
-    For now the recommended way is to run it via cron:
+    crontab with -F switch. The recommended way for now is to run it via cron:
 
     "0 */2 * * *  /usr/bin/mlmmj-maintd -F -L /var/spool/mlmmj/mlmmj-test"
 
diff --git a/TODO b/TODO
index 4d4a05e7c0426e1e65feec0e25abe51ffeaefa8a..0294e6f0440b9c7cc4f7a4c0529d9507006f3829 100644 (file)
--- a/TODO
+++ b/TODO
@@ -7,5 +7,3 @@ Functionality items:
  o listname+get functionality
  o web interface
 
-An ever ongoing TODO is we need someone to run it all through valgrind or
-similar and plug all memory and fd leaks etc.
diff --git a/VERSION b/VERSION
index faef31a4357c48d6e4c55e84c8be8e3bc9055e20..1ce5663a3f6befa08fc4c3683480b2a83245cb0a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.7.0
+0.7.2-RC
index 9a01b42f3952e49ad5930d8cca18cc0de7cf4e40..d4f15d9ac21e0da2089ba751dda919f86137dbab 100644 (file)
@@ -14,6 +14,7 @@
 #define LOG_ARGS __FILE__, __LINE__, strerror(errno)
 
 void log_set_name(const char *name);
+void log_free_name(void);
 void log_error(const char *file, int line, const char *errstr,
                const char *fmt, ...);
 
index 4db900596bb010530a77e30d636f48e048dd8844..e26c795ab19bc00ef449b8c4fe3eeb2a9ee531e8 100644 (file)
@@ -18,6 +18,11 @@ void log_set_name(const char* name)
        log_name = strdup(name);
 }
 
+void log_free_name()
+{
+       free(log_name);
+}
+
 void log_error(const char *file, int line, const char *errstr,
        const char *fmt, ...)
 {
index 1b829c2c475b71e536e50b07b1f6ef677dd7c089..8838a9a70c702bab15d2a81e5c78a886a2457f91 100644 (file)
@@ -127,6 +127,7 @@ void do_probe(const char *listdir, const char *mlmmjsend, const char *addr)
        free(listaddr);
        free(listfqdn);
        free(listname);
+       free(indexstr);
 
        probefile = concatstr(4, listdir, "/bounce/", addr, "-probe");
        MY_ASSERT(probefile);
@@ -292,7 +293,6 @@ int main(int argc, char **argv)
                free(bfilename);
                exit(EXIT_FAILURE);
        }
-       free(bfilename);
 
        /* TODO check that the message is not already bounced */
 
@@ -317,6 +317,7 @@ int main(int argc, char **argv)
                rename(mailname, savename);
                free(savename);
        }
+       free(bfilename);
 
        return EXIT_SUCCESS;
 }
index 5881af9aa5187606164d3adaf737c174ed5c3921..d1defa0c3e79a4878fa4e8e22ab2f6f2589ac3a1 100644 (file)
@@ -293,6 +293,8 @@ int resend_requeue(const char *listdir, const char *mlmmjsend)
                return 1;
        }
 
+       free(dirname);
+       
        while((dp = readdir(queuedir)) != NULL) {
                if((strcmp(dp->d_name, "..") == 0) ||
                        (strcmp(dp->d_name, ".") == 0))
@@ -634,7 +636,7 @@ int main(int argc, char **argv)
 {
        int opt, daemonize = 1;
        char *bindir, *listdir = NULL, *mlmmjsend, *mlmmjbounce, *mlmmjunsub;
-       char *logstr, *logname, *random = random_str();
+       char *logstr, *logname, *random;
        char uidstr[16];
        struct stat st;
 
@@ -697,10 +699,13 @@ int main(int argc, char **argv)
        }
 
        for(;;) {
+               random = random_str();
                logname = concatstr(3, listdir, "maintdlog-", random);
+               free(random);
                maintdlogfd = open(logname, O_WRONLY|O_EXCL|O_CREAT,
                                        S_IRUSR|S_IWUSR);
                if(maintdlogfd < 0) {
+                       free(logname);
                        log_error(LOG_ARGS, "Could not open maintenance logfile");
                        exit(EXIT_FAILURE);
                }
@@ -744,6 +749,12 @@ int main(int argc, char **argv)
                else
                        sleep(MAINTD_SLEEP);
        }
+
+       free(mlmmjbounce);
+       free(mlmmjsend);
+       free(mlmmjunsub);
+
+       log_free_name();
                
        exit(EXIT_SUCCESS);
 }
index 63129005df6503468fce911cbcbb34ca82be1ab6..61e7eea9641e5d628d18281d3295e4d54975e409 100644 (file)
@@ -317,5 +317,7 @@ int main(int argc, char **argv)
        if(confirmsub)
                confirm_sub(listdir, listaddr, address, mlmmjsend);
 
+       free(listaddr);
+
        return EXIT_SUCCESS;
 }
index 779f0827f315b0e716f55fabeba1c6a16efde4bc..ce5ce29ec30008ec4f1a1c4f65b7a26098c1ef12 100644 (file)
@@ -426,6 +426,7 @@ int main(int argc, char **argv)
                        confirm_unsub(listdir, listaddr, address, mlmmjsend);
        }
        closedir(subddir);
+       free(listaddr);
 
        return EXIT_SUCCESS;
 }