Commit 6f24fe30 authored by Markus Elfring's avatar Markus Elfring Committed by Kalle Valo

hostap: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 71b9d0ae
...@@ -145,7 +145,7 @@ static void ap_free_sta(struct ap_data *ap, struct sta_info *sta) ...@@ -145,7 +145,7 @@ static void ap_free_sta(struct ap_data *ap, struct sta_info *sta)
if (sta->aid > 0) if (sta->aid > 0)
ap->sta_aid[sta->aid - 1] = NULL; ap->sta_aid[sta->aid - 1] = NULL;
if (!sta->ap && sta->u.sta.challenge) if (!sta->ap)
kfree(sta->u.sta.challenge); kfree(sta->u.sta.challenge);
del_timer_sync(&sta->timer); del_timer_sync(&sta->timer);
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment