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

Commit 0175f2d3 authored by Zhipeng Lu's avatar Zhipeng Lu Committed by Sasha Levin
Browse files

media: v4l2-mem2mem: fix a memleak in v4l2_m2m_register_entity



[ Upstream commit 8f94b49a5b5d386c038e355bef6347298aabd211 ]

The entity->name (i.e. name) is allocated in v4l2_m2m_register_entity
but isn't freed in its following error-handling paths. This patch
adds such deallocation to prevent memleak of entity->name.

Fixes: be2fff65 ("media: add helpers for memory-to-memory media controller")
Signed-off-by: default avatarZhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8269ab16
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment