iwinfo: properly initialize memory of global nl80211_state, fixes random libnl-tiny...
[openwrt/openwrt.git] / package / network / utils / iwinfo / src / iwinfo_nl80211.c
index 304a18b3ecb8582ad204b456adf5cd3ba3d28bdc..763ed61c979da5d93791d57f91cfa1096ba270d8 100644 (file)
@@ -41,6 +41,8 @@ static int nl80211_init(void)
                        goto err;
                }
 
+               memset(nls, 0, sizeof(*nls));
+
                nls->nl_sock = nl_socket_alloc();
                if (!nls->nl_sock) {
                        err = -ENOMEM;