Commit c7a218cb authored by Gaosheng Cui's avatar Gaosheng Cui Committed by Greg Kroah-Hartman
Browse files

media: ti: cal: fix possible memory leak in cal_ctx_create()



[ Upstream commit 7acd650a ]

The memory of ctx is allocated in cal_ctx_create(), but it will
not be freed when cal_ctx_v4l2_init() fails, so add kfree() when
cal_ctx_v4l2_init() fails to fix it.

Fixes: d68a94e9 ("media: ti-vpe: cal: Split video device initialization and registration")
Signed-off-by: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0a2e2674
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment