Skip to contentSkip to conversation

sae: remove unneeded NULL pointer check

PATCH Applied James Prestwood 2 participants 2 messages Oct 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sae: remove unneeded NULL pointer check

The frame was already validated, and mmpdu_body will never return a NULL pointer.

---
 src/sae.c | 5 -----
 1 file changed, 5 deletions(-)
src/sae.c +0 -5
index a17c2883..391ed4f8 100644
@@ -1021,11 +1021,6 @@ static int sae_rx_authenticate(struct auth_proto *ap,
 
 	auth = mmpdu_body(hdr);
 
-	if (!auth) {
-		l_debug("Auth frame body did not validate");
-		goto reject;
-	}
-
 	len -= mmpdu_header_len(hdr);
 
 	ret = sae_verify_packet(sm, L_LE16_TO_CPU(auth->transaction_sequence),
Signature · 1 line
2.17.1
#1 lore raw

Hi James,

Quoted 6 lines · James Prestwood

The frame was already validated, and mmpdu_body will never return a NULL pointer.

---
  src/sae.c | 5 -----
  1 file changed, 5 deletions(-)

Applied, thanks.

Regards,
-Denis