Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b6971be authored by Mohammed Javid's avatar Mohammed Javid Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Fix to use after free issue



Added to code changes to ref_cnt variable will decrement only
when add_ref_hdr variable is true.

Change-Id: I0bcc3909669f4843c43135e5f047ac28fa62bb63
Acked-by: default avatarAshok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent 3ce4bd68
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -569,6 +569,7 @@ ipa_insert_failed:
	list_del(&entry->link);
	htbl->proc_ctx_cnt--;
bad_len:
	if (add_ref_hdr)
		hdr_entry->ref_cnt--;
	entry->cookie = 0;
	kmem_cache_free(ipa_ctx->hdr_proc_ctx_cache, entry);