media: v4l2-tpg: fix some memleaks in tpg_alloc
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:Zhipeng Lu <alexious@zju.edu.cn> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Loading
Please register or sign in to comment