summaryrefslogtreecommitdiffstats
path: root/package/libnl/libnl-1.1-minor-leaks.patch
blob: 855a6ab3912e84837c14accfd0e2e71e9d95c930 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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);