changeset 821:bf600175dc16

Ensure that filename is always freed in clean_nolongerbouncing()
author Richard Mortimer
date Tue, 25 Jan 2011 16:46:52 +0000
parents ae97908485e9
children 0040ff9fec8b
files src/mlmmj-maintd.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/mlmmj-maintd.c	Tue Jan 25 16:35:25 2011 +0000
+++ b/src/mlmmj-maintd.c	Tue Jan 25 16:46:52 2011 +0000
@@ -532,11 +532,15 @@
 			}
 
 			probefd = open(filename, O_RDONLY);
-			if(probefd < 0)
+			if(probefd < 0) {
+				myfree(filename);
 				continue;
+			}
 			probetimestr = mygetline(probefd);
-			if(probetimestr == NULL)
+			if(probetimestr == NULL) {
+				myfree(filename);
 				continue;
+			}
 			close(probefd);
 			chomp(probetimestr);
 			probetime = (time_t)strtol(probetimestr, NULL, 10);