Skip to content

hostapd: set elements number to 0 for freed arrays

There are several cases in hostapd where iface->hw_features is iterated iface->num_hw_features times. When hostapd_cleanup_iface_partial() frees iface->hw_features it keeps the elements number as is, and several functions try to access *(NULL). The zeroed elements number allows to avoid such access. The similar num_rates field has not been observed harmful, but it makes sense to treat it the same way.

Merge request reports