Skip to content
Snippets Groups Projects
Commit 94303a06 authored by Zhipeng Lu's avatar Zhipeng Lu Committed by Sasha Levin
Browse files

media: v4l2-tpg: fix some memleaks in tpg_alloc


[ Upstream commit 8cf9c505 ]

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: 63881df9 ("[media] vivid: add the Test Pattern Generator")
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 19cb33fa
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment