mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
staging: wilc1000: fix to use correct index to free scanned info in clear_shadow_scan()
Fixes to use correct index to free the allocated memory for ies
information. The check was done using 'last_scanned_cnt' index and its
not correct, so use the correct index ('i') to check for before freeing
the allocated memory.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1803da60f7
commit
19707ca295
1 changed files with 2 additions and 2 deletions
|
|
@ -165,9 +165,9 @@ static void clear_shadow_scan(void)
|
|||
return;
|
||||
|
||||
for (i = 0; i < last_scanned_cnt; i++) {
|
||||
if (last_scanned_shadow[last_scanned_cnt].ies) {
|
||||
if (last_scanned_shadow[i].ies) {
|
||||
kfree(last_scanned_shadow[i].ies);
|
||||
last_scanned_shadow[last_scanned_cnt].ies = NULL;
|
||||
last_scanned_shadow[i].ies = NULL;
|
||||
}
|
||||
|
||||
kfree(last_scanned_shadow[i].join_params);
|
||||
|
|
|
|||
Loading…
Reference in a new issue