[OpenWrt-Devel] [PATCH] swconfig: swlib.c: Fix another memleak
Alexandru Ardelean
ardeleanalex at gmail.com
Wed Jul 8 02:21:47 EDT 2015
From: Helmut Schaa <hs at ocedo.com>
---
openwrt/package/network/config/swconfig/src/swlib.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/network/config/swconfig/src/swlib.c b/package/network/config/swconfig/src/swlib.c
index dae603c..f79b826 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;
}
--
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list