Commit 7280640
committed
[nrf fromlist] drivers: wifi: Clean up exit path
Fix couple of bugs in exit path:
- In case of calloc failure, return's without unlocking
- memory is freed outside lock, in case of a tiny window of race, this
can cause a crash when this function is called from two threads.
Upstream PR: zephyrproject-rtos/zephyr#79891
Signed-off-by: Chaitanya Tata <[email protected]>1 parent fbd4c0b commit 7280640
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
495 | | - | |
496 | | - | |
497 | 495 | | |
| 496 | + | |
498 | 497 | | |
499 | 498 | | |
500 | 499 | | |
| |||
0 commit comments