# HG changeset patch # User mmj # Date 1106054564 -39600 # Node ID 2a3886ef3c753056ef42be352e0cd33dddc2f943 # Parent 37671335fe17d2a87ece7f57d070be66375e7375 Lets init the strlist before starting to use it diff -r 37671335fe17 -r 2a3886ef3c75 src/mlmmj-send.c --- a/src/mlmmj-send.c Tue Jan 18 21:47:42 2005 +1100 +++ b/src/mlmmj-send.c Wed Jan 19 00:22:44 2005 +1100 @@ -441,6 +441,9 @@ int res, ret, i; struct strlist stl; + stl.strs = (char **)mymalloc(1 + maxverprecips * sizeof(char *)); + stl.count = 0; + do { res = getaddrsfromfd(&stl, subfd, maxverprecips); if(stl.count == maxverprecips) { @@ -697,6 +700,9 @@ exit(EXIT_FAILURE); } + stl.strs = (char **)mymalloc(1 + maxverprecips * sizeof(char *)); + stl.count = 0; + maxverprecipsstr = ctrlvalue(listdir, "maxverprecips"); if(maxverprecipsstr) { maxverprecips = atol(maxverprecipsstr); @@ -964,8 +970,6 @@ exit(EXIT_FAILURE); } - stl.strs = (char **)mymalloc(1 + maxverprecips * sizeof(char *)); - stl.count = 0; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); verpfrom = concatstr(5, listname, "+bounces-", strindex, "@", @@ -1097,6 +1101,10 @@ break; } + for(i = 0; i < stl.count; i++) + myfree(stl.strs[i]); + stl.count = 0; + myfree(hdrs); myfree(body); myfree(mlmmjbounce); diff -r 37671335fe17 -r 2a3886ef3c75 src/mlmmj-sub.c --- a/src/mlmmj-sub.c Tue Jan 18 21:47:42 2005 +1100 +++ b/src/mlmmj-sub.c Wed Jan 19 00:22:44 2005 +1100 @@ -93,7 +93,7 @@ { char *maildata[2] = { "newsub", NULL }; char *listfqdn, *listname, *fromaddr, *tostr; - char *queuefilename = NULL, *listtext; + char *queuefilename = NULL, *listtext = NULL; listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr);