aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-06-16 12:43:16 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-06-16 12:43:16 +0000
commita6446b35293914f5aed0f6c67225cbad5e93e3c1 (patch)
treeca06dbdbb0d38591883b020a7a91bf32cbfc6b03
parent760db752475e2b67ed930bdc84165388d362d3b4 (diff)
downloadmaster-187ad058-a6446b35293914f5aed0f6c67225cbad5e93e3c1.tar.gz
master-187ad058-a6446b35293914f5aed0f6c67225cbad5e93e3c1.tar.bz2
master-187ad058-a6446b35293914f5aed0f6c67225cbad5e93e3c1.zip
libnl: backport memleak fix
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11500 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/libnl/patches/130-fix_minor_memleaks_on_exit.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/package/libnl/patches/130-fix_minor_memleaks_on_exit.patch b/package/libnl/patches/130-fix_minor_memleaks_on_exit.patch
new file mode 100644
index 0000000000..855a6ab391
--- /dev/null
+++ b/package/libnl/patches/130-fix_minor_memleaks_on_exit.patch
@@ -0,0 +1,40 @@
+From: Patrick McHardy <kaber@trash.net>
+Date: Fri, 18 Jan 2008 16:55:49 +0000 (+0100)
+Subject: [LIBNL]: Fix minor memleaks on exit
+X-Git-Url: http://git.kernel.org/?p=libs%2Fnetlink%2Flibnl.git;a=commitdiff_plain;h=b64f15d6f947839236fa276d473d238f8c9b9d57;hp=e91bb2ffb090955d443e643a25b250bf3d33534a
+
+[LIBNL]: Fix minor memleaks on exit
+
+Make valgrind happy ...
+
+Signed-off-by: Patrick McHardy <kaber@trash.net>
+---
+
+diff --git a/lib/route/route_utils.c b/lib/route/route_utils.c
+index a12d169..1386cda 100644
+--- a/lib/route/route_utils.c
++++ b/lib/route/route_utils.c
+@@ -63,6 +63,11 @@ static void __init init_routing_table_names(void)
+ add_routing_table_name(RT_TABLE_LOCAL, "local");
+ };
+
++static void __exit release_routing_table_names(void)
++{
++ __trans_list_clear(&table_names);
++}
++
+ int rtnl_route_read_table_names(const char *path)
+ {
+ __trans_list_clear(&table_names);
+@@ -104,6 +109,11 @@ static void __init init_proto_names(void)
+ add_proto_name(RTPROT_STATIC, "static");
+ };
+
++static void __exit release_proto_names(void)
++{
++ __trans_list_clear(&proto_names);
++}
++
+ int rtnl_route_read_protocol_names(const char *path)
+ {
+ __trans_list_clear(&proto_names);