From 8232fbddbf3449fcef8f1dc031b15faef9007d3c Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 9 Feb 2021 10:42:03 -0600 Subject: [PATCH] unit: Drop un-needed null checks both ap_sm and sta_sm are passed to eapol_register and eapol_start. No need to check for null here --- unit/test-wsc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/unit/test-wsc.c b/unit/test-wsc.c index f2e9b864..ca921e90 100644 --- a/unit/test-wsc.c +++ b/unit/test-wsc.c @@ -2319,11 +2319,8 @@ static void test_ap_sta_run(struct test_ap_sta_data *s) s->to_sta_data, len, false); } - if (s->ap_sm) - eapol_sm_free(s->ap_sm); - - if (s->sta_sm) - eapol_sm_free(s->sta_sm); + eapol_sm_free(s->ap_sm); + eapol_sm_free(s->sta_sm); eapol_exit(); eap_exit();