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

Commit ced1f060 authored by Dhoat Harpal's avatar Dhoat Harpal
Browse files

soc: qcom: glink: Free if_ptr before freeing dummy transport



Dummy transport is only way to access if_ptr. When dummy
transport is freed, if_ptr allocated for dummy transport is
not freed. This result in memory leak.

kfree of if_ptr is called before freeing dummy transport.

CRs-Fixed: 2116744
Change-Id: I832e0fcde418b7c3d992f50e817866bc9075da3c
Signed-off-by: default avatarDhoat Harpal <hdhoat@codeaurora.org>
parent d6ed7268
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3767,6 +3767,8 @@ static void glink_dummy_xprt_ctx_release(struct rwref_lock *xprt_st_lock)
	GLINK_INFO("%s: freeing transport [%s->%s]context\n", __func__,
				xprt_ctx->name,
				xprt_ctx->edge);
	kfree(xprt_ctx->ops);
	xprt_ctx->ops = NULL;
	kfree(xprt_ctx);
}