aboutsummaryrefslogtreecommitdiffstats
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
commit7a04fd0e3a457e2d561201fffecb5811710ccb92 (patch)
treea333428b2021d75475417794c3f66609d5a1e70b
parentdc2c89c64c0518a53686498926bd190f624a4a61 (diff)
downloadupstream-7a04fd0e3a457e2d561201fffecb5811710ccb92.tar.gz
upstream-7a04fd0e3a457e2d561201fffecb5811710ccb92.tar.bz2
upstream-7a04fd0e3a457e2d561201fffecb5811710ccb92.zip
swconfig: swlib.c: Fix another memleak
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 46275
-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;
}