Skip to content

Commit

Permalink
change ScanResult to static instead of dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
pankore committed Apr 10, 2023
1 parent 94ee203 commit b58b7b2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ void AmebaWiFiDriver::OnScanWiFiNetworkDone()
return;
}

rtw_scan_result_t * ScanResult = (rtw_scan_result *) pvPortMalloc(NumAP * sizeof(rtw_scan_result));
matter_get_scan_results(ScanResult, NumAP);
rtw_scan_result_t * ScanResult = matter_get_scan_results();

if (ScanResult)
{
Expand Down Expand Up @@ -258,7 +257,6 @@ void AmebaWiFiDriver::OnScanWiFiNetworkDone()
mpScanCallback = nullptr;
}
}
vPortFree(ScanResult);
}

CHIP_ERROR GetConfiguredNetwork(Network & network)
Expand Down

0 comments on commit b58b7b2

Please sign in to comment.