qcacld-3.0: Avoid memory leak if don't found session

It won't free the nbuffer when tx mgmt frame and don't found session,
then cause memory leak. So free memory to avoid memory leak.

Change-Id: I4e6c2fcdcbf9fa549887602eeaeee3126edc1ef5
CRs-Fixed: 2400974
This commit is contained in:
Wu Gao 2019-03-12 14:16:37 +08:00 • committed by nshrivas
commit 7c0a23f682

View file

@ -4761,7 +4761,9 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx,
sme_session_id = mb_msg->session_id;
session = pe_find_session_by_sme_session_id(mac_ctx, sme_session_id);
if (session == NULL) {
pe_err("session not found for given sme session");
cds_packet_free((void *)packet);
pe_err("session not found for given sme session %d",
sme_session_id);
return;
}