mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Fix memory leaks in wma_pno_start()
Clean up the exit path to free the channel list and params buffers. CRs-Fixed: 1056031 Change-Id: I2d7910169e9535ae03c37c9ffe07fd2a7b763350
This commit is contained in:
parent
7d06dd55c9
commit
94580ee4ea
1 changed files with 11 additions and 10 deletions
|
|
@ -2947,7 +2947,8 @@ QDF_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno)
|
|||
params = qdf_mem_malloc(sizeof(struct pno_scan_req_params));
|
||||
if (params == NULL) {
|
||||
WMA_LOGE("%s : Memory allocation failed", __func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto exit_pno_start;
|
||||
}
|
||||
|
||||
params->enable = pno->enable;
|
||||
|
|
@ -2991,17 +2992,17 @@ QDF_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno)
|
|||
|
||||
status = wmi_unified_pno_start_cmd(wma->wmi_handle,
|
||||
params, channel_list);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
qdf_mem_free(channel_list);
|
||||
return status;
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
wma->interfaces[pno->sessionId].pno_in_progress = true;
|
||||
WMA_LOGD("PNO start request sent successfully for vdev %d",
|
||||
pno->sessionId);
|
||||
}
|
||||
|
||||
qdf_mem_free(channel_list);
|
||||
wma->interfaces[pno->sessionId].pno_in_progress = true;
|
||||
|
||||
WMA_LOGD("PNO start request sent successfully for vdev %d",
|
||||
pno->sessionId);
|
||||
|
||||
exit_pno_start:
|
||||
if (channel_list)
|
||||
qdf_mem_free(channel_list);
|
||||
if (params)
|
||||
qdf_mem_free(params);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue