diff mbox series

[5/5] ap: bail in ap_del_station if AP is going down

Message ID 20240229181217.1503555-5-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/5] ap: check that the last band_freq_attrs was set | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Feb. 29, 2024, 6:12 p.m. UTC
Caught by static analysis, if this condition is met the AP is going
down so we cannot continue further accessing the ap object.
---
 src/ap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/ap.c b/src/ap.c
index a6f8f306..b4e7593e 100644
--- a/src/ap.c
+++ b/src/ap.c
@@ -455,7 +455,8 @@  static void ap_del_station(struct sta_state *sta, uint16_t reason,
 		sta->ip_alloc_lease = NULL;
 		l_dhcp_server_expire_by_mac(ap->netconfig_dhcp, sta->addr);
 
-		ap_event_done(ap, prev);
+		if (ap_event_done(ap, prev))
+			return;
 	}
 
 	/*