]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Fix crash with CONFIG_TAXONOMY enabled
authorFelix Fietkau <nbd@nbd.name>
Thu, 3 May 2018 10:36:15 +0000 (12:36 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 31 May 2018 10:06:07 +0000 (13:06 +0300)
wpa_s->ifmsh needs to be allocated using hostapd_alloc_iface() instead
of a direct call to os_zalloc(), otherwise the linked list for station
taxonomy items remains uninitialized, leading to a crash on the first
attempt to traverse that list

Signed-off-by: Felix Fietkau <nbd@nbd.name>
wpa_supplicant/mesh.c

index 8a3badac2c7143d3f3bd854c6ca6b6e9be9151c4..38b9fb320ca9f60f14a62975193d68735d6f9726 100644 (file)
@@ -169,7 +169,7 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
                return 0;
        }
 
-       wpa_s->ifmsh = ifmsh = os_zalloc(sizeof(*wpa_s->ifmsh));
+       wpa_s->ifmsh = ifmsh = hostapd_alloc_iface();
        if (!ifmsh)
                return -ENOMEM;