aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/swconfig
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-07-08 15:59:38 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-07-08 15:59:38 +0000
commit18bd234d51d579b9138f3a75b58dd5f9a79fd1c9 (patch)
treeaed526f634a8464fec9d54371eb27f6945102aac /package/network/config/swconfig
parent267cd29c28605efb25e15d468d05a89122afeab3 (diff)
downloadmaster-187ad058-18bd234d51d579b9138f3a75b58dd5f9a79fd1c9.tar.gz
master-187ad058-18bd234d51d579b9138f3a75b58dd5f9a79fd1c9.tar.bz2
master-187ad058-18bd234d51d579b9138f3a75b58dd5f9a79fd1c9.zip
swconfig: swlib.c: Fix another memleak
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46275 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/config/swconfig')
-rw-r--r--package/network/config/swconfig/src/swlib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/network/config/swconfig/src/swlib.c b/package/network/config/swconfig/src/swlib.c
index d9ef62f4ab..0dbace551e 100644
--- a/package/network/config/swconfig/src/swlib.c
+++ b/package/network/config/swconfig/src/swlib.c
@@ -529,10 +529,13 @@ struct switch_attr *swlib_lookup_attr(struct switch_dev *dev,
static void
swlib_priv_free(void)
{
+ if (family)
+ nl_object_put((struct nl_object*)family);
if (cache)
nl_cache_free(cache);
if (handle)
nl_socket_free(handle);
+ family = NULL;
handle = NULL;
cache = NULL;
}