Commit ee43b72
authored
RDKBWIFI-203: wifi_ctrl_wifiapi_handlers: add null check for dev_array (rdkcentral#696)
The changes in this PR were automatically generated by the Permanence AI
Coder and reviewed by @fwph. This change moves the deallocation of
dev_array outside of the for loop to prvent a null pointer dereference
when num_devs > 1. In addition, it adds a null check for dev_array
after the call to wifi_getApAssociatedDeviceDiagnosticResult3. If dev_array
is null, an error message is written to result_buf and the function returns
early to prevent null pointer deferecnces.
on-behalf-of: @permanence-ai <[email protected]>1 parent 465af14 commit ee43b72
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
| |||
660 | 664 | | |
661 | 665 | | |
662 | 666 | | |
| 667 | + | |
663 | 668 | | |
664 | 669 | | |
665 | 670 | | |
666 | 671 | | |
667 | | - | |
668 | 672 | | |
669 | 673 | | |
670 | 674 | | |
| |||
0 commit comments