]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fixed memory leak in substitute_one() (Ben Schmidt)
authormortenp <none@none>
Tue, 16 Feb 2010 16:59:48 +0000 (03:59 +1100)
committermortenp <none@none>
Tue, 16 Feb 2010 16:59:48 +0000 (03:59 +1100)
ChangeLog
src/prepstdreply.c

index 1ed75f63713b3db620ddefdaf043a4edaf54ced3..9bcfa882fa4a1c1815c1c35653dc9ed5ebd80da8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+ o Fixed memory leak in substitute_one() (Ben Schmidt)
  o Updated German listtexts (Christoph Wilke)
  o Updated TUNABLES file (Ben Schmidt)
 1.2.17
index 6040c97616be98d195b57f8e0ff1eb879d398744..ae44701df43cf7cd65f20b7244acbc18939adb6d 100644 (file)
@@ -145,10 +145,9 @@ char *substitute_one(const char *line, const char *listaddr,
                                value = concatstr(3, value, " ", str);
                                if(tmp)
                                        myfree(tmp);
+                               myfree(str);
                                count++;
                        }
-                       if(str)
-                               myfree(str);
                        close(mailfd);
                }else{
                        log_error(LOG_ARGS, "Could not substitute $originalmail$ (mailname == %s)",mailname);