022-mesh-fix-crash-with-CONFIG_TAXONOMY-enabled.patch 703 B

1234567891011121314151617181920212223
  1. From: Felix Fietkau <[email protected]>
  2. Date: Thu, 3 May 2018 12:34:31 +0200
  3. Subject: [PATCH] mesh: fix crash with CONFIG_TAXONOMY enabled
  4. wpa_s->ifmsh needs to be allocated using hostapd_alloc_iface() instead
  5. of a direct call to os_zalloc, otherwise the linked list for station
  6. taxonomy items remains uninitialized, leading to a crash on the first
  7. attempt to traverse that list
  8. Signed-off-by: Felix Fietkau <[email protected]>
  9. ---
  10. --- a/wpa_supplicant/mesh.c
  11. +++ b/wpa_supplicant/mesh.c
  12. @@ -214,7 +214,7 @@ static int wpa_supplicant_mesh_init(stru
  13. return 0;
  14. }
  15. - wpa_s->ifmsh = ifmsh = os_zalloc(sizeof(*wpa_s->ifmsh));
  16. + wpa_s->ifmsh = ifmsh = hostapd_alloc_iface();
  17. if (!ifmsh)
  18. return -ENOMEM;