From eab6f5e04a2b31d8ef579b15bf3208b0cbccdfee Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 21 Apr 2012 18:54:35 +0300 Subject: [PATCH] Remove unnecessary EVENT_RX_MGMT data validation Make wpa_supplicant_event() more consistent by not checking data in either location handling EVENT_RX_MGMT events. This event is required to specify the data so this pointer cannot be NULL. Signed-hostap: Jouni Malinen --- wpa_supplicant/events.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 8fdc544da..da9cf2b37 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2067,8 +2067,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, { int level = MSG_DEBUG; - if (event == EVENT_RX_MGMT && data && data->rx_mgmt.frame && - data->rx_mgmt.frame_len >= 24) { + if (event == EVENT_RX_MGMT && data->rx_mgmt.frame_len >= 24) { const struct ieee80211_hdr *hdr; u16 fc; hdr = (const struct ieee80211_hdr *) data->rx_mgmt.frame;