fstools: update to the latest master branch
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 022-mesh-fix-crash-with-CONFIG_TAXONOMY-enabled.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Thu, 3 May 2018 12:34:31 +0200
3 Subject: [PATCH] mesh: fix crash with CONFIG_TAXONOMY enabled
4
5 wpa_s->ifmsh needs to be allocated using hostapd_alloc_iface() instead
6 of a direct call to os_zalloc, otherwise the linked list for station
7 taxonomy items remains uninitialized, leading to a crash on the first
8 attempt to traverse that list
9
10 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 ---
12
13 --- a/wpa_supplicant/mesh.c
14 +++ b/wpa_supplicant/mesh.c
15 @@ -215,7 +215,7 @@ static int wpa_supplicant_mesh_init(stru
16 return 0;
17 }
18
19 - wpa_s->ifmsh = ifmsh = os_zalloc(sizeof(*wpa_s->ifmsh));
20 + wpa_s->ifmsh = ifmsh = hostapd_alloc_iface();
21 if (!ifmsh)
22 return -ENOMEM;
23