Skip to content

Commit 162b314

Browse files
krish2718bjarki-andreasen
authored andcommitted
[nrf fromlist] modules: hostap: Fix double free of the event
When an event is sent the receiver gets is asynchronously and hence is responsible for free the event, the sender should only free in case of error conditions i.e., unable to send. Else, this causes a tough to debug double-free. Upstream PR: zephyrproject-rtos/zephyr#79231 Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 9202531 commit 162b314

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/hostap/src/supp_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ static int del_interface(struct supplicant_context *ctx, struct net_if *iface)
436436

437437
supplicant_generate_state_event(ifname, NET_EVENT_SUPPLICANT_CMD_IFACE_REMOVED, 0);
438438

439+
return 0;
440+
439441
out:
440442
if (event) {
441443
os_free(event);

0 commit comments

Comments
 (0)