Explorar el Código

qcacld-3.0: Fix mem leak during reset passpoint list wma command

The function sme_reset_passpoint_list, posts the wma message
WMA_RESET_PASSPOINT_LIST_REQ. This message is freed at the
sme_reset_passpoint_list in case of failure. But for the success
case, the req_msg is not freed at wma_mc_process_msg. This
results in mem_leak in case of success case.

Free the req_msg at wma_mc_process_msg after returning from the
call wma_reset_passpoint_network_list.

Change-Id: Ib4b427a8acc2d531ac9d6e8f92a30205163ec0ba
CRs-Fixed: 2259237
Pragaspathi Thilagaraj hace 6 años
padre
commit
f65cffe88c
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      core/wma/src/wma_main.c

+ 1 - 0
core/wma/src/wma_main.c

@@ -8220,6 +8220,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 	case WMA_RESET_PASSPOINT_LIST_REQ:
 		wma_reset_passpoint_network_list(wma_handle,
 			(struct wifi_passpoint_req *)msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* FEATURE_WLAN_EXTSCAN */
 	case WMA_SET_SCAN_MAC_OUI_REQ: