Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 */