From: Florian Fainelli Date: Mon, 28 Sep 2009 19:17:23 +0000 (+0000) Subject: merge r17790 to packages_8.09 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=d8d18933d36b3081602665a82e7ea38b2cfc9cc7 merge r17790 to packages_8.09 SVN-Revision: 17791 --- diff --git a/net/miniupnpd/patches/102-iptcrdr_memleaks.patch b/net/miniupnpd/patches/102-iptcrdr_memleaks.patch new file mode 100644 index 0000000000..5af3c05955 --- /dev/null +++ b/net/miniupnpd/patches/102-iptcrdr_memleaks.patch @@ -0,0 +1,67 @@ +Index: miniupnpd-1.1/netfilter/iptcrdr.c +=================================================================== +--- miniupnpd-1.1.orig/netfilter/iptcrdr.c 2008-03-03 02:41:28.000000000 +0100 ++++ miniupnpd-1.1/netfilter/iptcrdr.c 2009-09-28 21:14:48.000000000 +0200 +@@ -371,11 +371,21 @@ + if(h) + { + r = delete_rule_and_commit(index, &h, "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, "delete_filter_rule"); ++#ifdef IPTABLES_143 ++ iptc_free(h); ++#else ++ iptc_free(&h); ++#endif + } + } + del_redirect_desc(eport, proto); +@@ -465,20 +475,40 @@ + { + 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; + } + if(!iptc_append_entry(miniupnpd_chain, e, &h)) + { + 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; + } + if(!iptc_commit(&h)) + { + 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; + } +