From aaa2a05e74532806f1f76071ec3bec738694cc80 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Tue, 14 May 2019 15:39:13 +0800 Subject: [PATCH] qcacld-3.0: Fix possible memory leak when set station key If calling lim_send_set_sta_key_req with sendRsp==false, it didn't free the tpSetStaKeyParams memory allocated in this function. This scenario is possible hit when station key update during roaming before new bss adding. Change-Id: I29209576622bc2495a7ce3064e82efca2e70d19a CRs-Fixed: 2452108 --- core/wma/src/wma_mgmt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index e41da0d99331..65ef4a83d4ad 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -2628,6 +2628,8 @@ out: if (key_info->sendRsp) wma_send_msg_high_priority(wma_handle, WMA_SET_STAKEY_RSP, (void *)key_info, 0); + else + qdf_mem_free(key_info); } #endif