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
This commit is contained in:
Selvaraj, Sridhar 2016-09-23 13:07:57 +05:30 • committed by qcabuildsw
commit 5c9146d3cf

View file

@ -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);