[PATCH] ipset/iptreemap: Fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We leak the strdup()ed memory for each element we parse.

Signed-off-by: Sven Wegener <sven.wegener@xxxxxxxxxxx>
---
 ipset_iptreemap.c |    3 +++
 1 file changed, 3 insertions(+)

--- ipset.orig/ipset_iptreemap.c
+++ ipset/ipset_iptreemap.c
@@ -17,6 +17,7 @@
 
 #include <limits.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -88,6 +89,8 @@
 		}
 	}
 
+	free(saved);
+
 	return 1;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux