From 517a2200deb8aa6da02a00d4b1b88c0a58bd5b73 Mon Sep 17 00:00:00 2001 From: Yu Ouyang Date: Tue, 6 Aug 2019 14:36:52 +0800 Subject: [PATCH] qcacld-3.0: Fix memory leak issue Object 'tx_conf_event' was dereferenced after being freed by calling 'qdf_mem_free(tx_conf_event)' function. Object 'tx_conf_event->nbuf' can't be freed. Free 'tx_conf_event->buf' before 'tx_conf_event' free. Change-Id: Id5a8f17db4d58395837db9878c6c7d87e9fe40c4 CRs-Fixed: 2503761 --- components/p2p/core/src/wlan_p2p_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/p2p/core/src/wlan_p2p_main.c b/components/p2p/core/src/wlan_p2p_main.c index 733b4d675b72..ab95df6c2372 100644 --- a/components/p2p/core/src/wlan_p2p_main.c +++ b/components/p2p/core/src/wlan_p2p_main.c @@ -1085,8 +1085,8 @@ QDF_STATUS p2p_event_flush_callback(struct scheduler_msg *msg) break; case P2P_EVENT_MGMT_TX_ACK_CNF: tx_conf_event = (struct p2p_tx_conf_event *)msg->bodyptr; - qdf_mem_free(tx_conf_event); qdf_nbuf_free(tx_conf_event->nbuf); + qdf_mem_free(tx_conf_event); break; case P2P_EVENT_LO_STOPPED: lo_stop_event = (struct p2p_lo_stop_event *)msg->bodyptr;