-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[beken-72xx] Free list returned by wlan_sta_scan_result() (#226)
* Free list returned by wlan_sta_scan_result() * scanAlloc improvements There were a few things I didn't like about this function: 1) realloc() was called a bit too often. 2) if realloc() failed, the previous memory was not freed. 3) scanAlloc returned previous count or 255 on error. But there was no real check for error and 255 could've been used as index to null. I think it's better to simple return boolean. 4) scanAlloc was clearing memory only up to (and excluding) the new entries. * Corrected clearing new entries in scanAlloc * scanAlloc() now returns number of allocated items * Fixed compilation issues related to goto.
- Loading branch information
1 parent
140cf07
commit 1d80b5f
Showing
3 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters