From 5c9146d3cf371b8a3be7b84adf73bdf252f16568 Mon Sep 17 00:00:00 2001 From: "Selvaraj, Sridhar" Date: Fri, 23 Sep 2016 13:07:57 +0530 Subject: [PATCH] qcacld-3.0: Fix double mem free while using cds_send_mb_message_to_mac cds_send_mb_message_to_mac function frees the input memory buffer irrespective of the success/failure of the message posting to the MAC message queue. This changes fixes the cases where the input buffer is attempted to be freed for fail case of cds_send_mb_message_to_mac Change-Id: I920822bf0ee268adb1312eed20de53450802fdc8 CRs-Fixed: 1070461 --- core/sme/src/csr/csr_api_scan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 994c2bca2b8b..a0f7a7efdc96 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -6854,7 +6854,6 @@ static void csr_send_scan_abort(tpAniSirGlobal mac_ctx, scan_id, session_id); status = cds_send_mb_message_to_mac(msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - qdf_mem_free(msg); sms_log(mac_ctx, LOGE, FL("Failed to send abort scan.scan_id %d session %d"), scan_id, session_id); @@ -7378,7 +7377,6 @@ void csr_scan_active_list_timeout_handle(void *userData) if (!QDF_IS_STATUS_SUCCESS(status)) { sms_log(mac_ctx, LOGE, FL(" Failed to post message to LIM")); - qdf_mem_free(msg); } csr_save_scan_results(mac_ctx, scan_cmd->u.scanCmd.reason, scan_cmd->sessionId);