hostapd: add missing NULL pointer check on radar notification
Fixes a race condition that can lead to a hostapd crash Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
		| @@ -1907,6 +1907,9 @@ void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequen | |||||||
| 	struct hostapd_data *hapd; | 	struct hostapd_data *hapd; | ||||||
| 	int i; | 	int i; | ||||||
|  |  | ||||||
|  | 	if (!ctx) | ||||||
|  | 		return; | ||||||
|  |  | ||||||
| 	blob_buf_init(&b, 0); | 	blob_buf_init(&b, 0); | ||||||
| 	blobmsg_add_u16(&b, "frequency", frequency); | 	blobmsg_add_u16(&b, "frequency", frequency); | ||||||
| 	blobmsg_add_u16(&b, "width", chan_width); | 	blobmsg_add_u16(&b, "width", chan_width); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau