diff options
author | Hu Wang <huw@codeaurora.org> | 2018-01-10 10:35:05 +0800 |
---|---|---|
committer | Hu Wang <huw@codeaurora.org> | 2018-01-10 11:03:27 +0800 |
commit | 98ebbeb2efa9545cae1e4c2adc0228f1d6bdf688 (patch) | |
tree | 31622ac6721c96c8cbb97e7a8182a9b44c0c23c3 | |
parent | 24f0f1da169c74fc42247ee262107b88283d2b84 (diff) | |
download | android_hardware_qcom_wlan-98ebbeb2efa9545cae1e4c2adc0228f1d6bdf688.tar.gz android_hardware_qcom_wlan-98ebbeb2efa9545cae1e4c2adc0228f1d6bdf688.tar.bz2 android_hardware_qcom_wlan-98ebbeb2efa9545cae1e4c2adc0228f1d6bdf688.zip |
Wifi-HAL: Call notifyResponse when link stats get success
When link stats get success, notifyResponse supposed to be called
to indicate stats to framework, and as part of it, clearStats will
free the memory of the stats.
However in current code, notifyResponse is not called, which makes
memory of the stats not freed (by clearStats).
Correct it to call notifyResponse in such case to avoid memory leak.
Change-Id: Iea72dfdf9936da8d6bb02c05535957ff590fb86b
CRs-Fixed: 2169626
-rw-r--r-- | qcwcn/wifi_hal/llstats.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qcwcn/wifi_hal/llstats.cpp b/qcwcn/wifi_hal/llstats.cpp index 23e5e7b..5648cb2 100644 --- a/qcwcn/wifi_hal/llstats.cpp +++ b/qcwcn/wifi_hal/llstats.cpp @@ -1350,10 +1350,9 @@ wifi_error wifi_get_link_stats(wifi_request_id id, if (ret != WIFI_SUCCESS) { LLCommand->clearStats(); goto cleanup; - } - - if (ret != WIFI_SUCCESS) + } else { ret = LLCommand->notifyResponse(); + } cleanup: return ret; |