From 8fd29a0439a3c04c80b12ad349ee9cf2c4c44437 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 3 May 2018 12:36:15 +0200 Subject: [PATCH] mesh: Fix crash with CONFIG_TAXONOMY enabled 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 --- wpa_supplicant/mesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c index 8a3badac2..38b9fb320 100644 --- a/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c @@ -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;