Преглед на файлове

qcacld-3.0: Fix memory leak for beacon

While processing beacon, fix memory leak.

Change-Id: I9245632f95d60c99b320ae8582e29e84c70a6e8e
CRs-Fixed: 2638014
Amar Singhal преди 5 години
родител
ревизия
84a912a96c
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      core/mac/src/sys/legacy/src/utils/src/parser_api.c

+ 3 - 0
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -3339,6 +3339,7 @@ sir_convert_reassoc_req_frame2_struct(struct mac_context *mac,
 			status, nFrame);
 		QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR,
 				   pFrame, nFrame);
+		qdf_mem_free(ar);
 		return QDF_STATUS_E_FAILURE;
 	} else if (DOT11F_WARNED(status)) {
 		pe_debug("There were warnings while unpacking a Re-association Request (0x%08x, %d bytes):",
@@ -3435,11 +3436,13 @@ sir_convert_reassoc_req_frame2_struct(struct mac_context *mac,
 
 	if (!pAssocReq->ssidPresent) {
 		pe_debug("Received Assoc without SSID IE");
+		qdf_mem_free(ar);
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	if (!pAssocReq->suppRatesPresent && !pAssocReq->extendedRatesPresent) {
 		pe_debug("Received Assoc without supp rate IE");
+		qdf_mem_free(ar);
 		return QDF_STATUS_E_FAILURE;
 	}
 	/* Why no call to 'updateAssocReqFromPropCapability' here, like */