Просмотр исходного кода

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
Selvaraj, Sridhar 8 лет назад
Родитель
Сommit
5c9146d3cf
1 измененных файлов с 0 добавлено и 2 удалено
  1. 0 2
      core/sme/src/csr/csr_api_scan.c

+ 0 - 2
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);