mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-26 19:14:18 +00:00
media: v4l2-tpg: fix some memleaks in tpg_alloc
[ Upstream commit8cf9c50510] In tpg_alloc, resources should be deallocated in each and every error-handling paths, since they are allocated in for statements. Otherwise there would be memleaks because tpg_free is called only when tpg_alloc return 0. Fixes:63881df94d("[media] vivid: add the Test Pattern Generator") Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b64cc91c6d
commit
4c86c772fe
1 changed files with 42 additions and 10 deletions
Loading…
Add table
Add a link
Reference in a new issue