changeset 716:4a8acfd3f95f

Fixed memory leak in substitute_one() (Ben Schmidt)
author mortenp
date Wed, 17 Feb 2010 03:59:48 +1100
parents f34642101c43
children 7e1127e22936
files ChangeLog src/prepstdreply.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jan 31 06:40:19 2010 +1100
+++ b/ChangeLog	Wed Feb 17 03:59:48 2010 +1100
@@ -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
--- a/src/prepstdreply.c	Sun Jan 31 06:40:19 2010 +1100
+++ b/src/prepstdreply.c	Wed Feb 17 03:59:48 2010 +1100
@@ -145,10 +145,9 @@
 				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);