From fb20e03199ab57dc2bb15934f8b5896cb207c688 Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 28 Sep 2009 19:12:02 +0000 Subject: [PATCH] [package] add memleak fixes from #5875 git-svn-id: svn://svn.openwrt.org/openwrt/packages@17790 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/miniupnpd/Makefile | 2 +- net/miniupnpd/patches/001-iptcrdr_memleaks.patch | 67 ++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 net/miniupnpd/patches/001-iptcrdr_memleaks.patch diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index c06279ae3..61261c7e7 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=miniupnpd PKG_VERSION:=1.3 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MD5SUM:=b5e70e80dcf45b424b8fe3c966bdc613 PKG_SOURCE_URL:=http://miniupnp.free.fr/files diff --git a/net/miniupnpd/patches/001-iptcrdr_memleaks.patch b/net/miniupnpd/patches/001-iptcrdr_memleaks.patch new file mode 100644 index 000000000..c273ca5f9 --- /dev/null +++ b/net/miniupnpd/patches/001-iptcrdr_memleaks.patch @@ -0,0 +1,67 @@ +--- a/netfilter/iptcrdr.c ++++ b/netfilter/iptcrdr.c +@@ -415,11 +415,21 @@ delete_redirect_and_filter_rules(unsigne + if(h) + { + r = delete_rule_and_commit(index, h, miniupnpd_nat_chain, "delete_redirect_rule"); ++#ifdef IPTABLES_143 ++ iptc_free(h); ++#else ++ iptc_free(&h); ++#endif + } + h = iptc_init("filter"); + if(h && (r == 0)) + { + r = delete_rule_and_commit(index, h, miniupnpd_forward_chain, "delete_filter_rule"); ++#ifdef IPTABLES_143 ++ iptc_free(h); ++#else ++ iptc_free(&h); ++#endif + } + } + del_redirect_desc(eport, proto); +@@ -509,6 +519,11 @@ iptc_init_verify_and_append(const char * + { + syslog(LOG_ERR, "%s : iptc_is_chain() error : %s\n", + logcaller, iptc_strerror(errno)); ++#ifdef IPTABLES_143 ++ iptc_free(h); ++#else ++ iptc_free(&h); ++#endif + return -1; + } + #ifdef IPTABLES_143 +@@ -519,6 +534,11 @@ iptc_init_verify_and_append(const char * + { + syslog(LOG_ERR, "%s : iptc_append_entry() error : %s\n", + logcaller, iptc_strerror(errno)); ++#ifdef IPTABLES_143 ++ iptc_free(h); ++#else ++ iptc_free(&h); ++#endif + return -1; + } + #ifdef IPTABLES_143 +@@ -529,8 +549,18 @@ iptc_init_verify_and_append(const char * + { + syslog(LOG_ERR, "%s : iptc_commit() error : %s\n", + logcaller, iptc_strerror(errno)); ++#ifdef IPTABLES_143 ++ iptc_free(h); ++#else ++ iptc_free(&h); ++#endif + return -1; + } ++#ifdef IPTABLES_143 ++ iptc_free(h); ++#else ++ iptc_free(&h); ++#endif + return 0; + } + -- 2.11.0