iwinfo: plug memory leak in nl80211 backend, nl80211_close() did not put the family...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 13 Jan 2012 00:54:25 +0000 (00:54 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 13 Jan 2012 00:54:25 +0000 (00:54 +0000)
SVN-Revision: 29723

package/iwinfo/Makefile
package/iwinfo/src/iwinfo_nl80211.c

index 55a0889604e8c404cd0c449922bfafffc325f31e..dae747015486beef09ff6272e22380137087e566 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
+# Copyright (C) 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
 #
 # This is free software, licensed under the GPL 2 license.
 #
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=22
+PKG_RELEASE:=23
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 PKG_CONFIG_DEPENDS := \
index 4672b9d6408b70894a3bd83008fca119b181c05e..4f3390fdbbbb46256fe7c2bc48e86bd2dda080d6 100644 (file)
@@ -559,6 +559,9 @@ void nl80211_close(void)
 {
        if (nls)
        {
+               if (nls->nl80211)
+                       genl_family_put(nls->nl80211);
+
                if (nls->nl_sock)
                        nl_socket_free(nls->nl_sock);