media: meson: vdec: potential dereference of null pointer
stable inclusion from stable-v5.10.110 commit 032b141a91a82a5f0107ce664a35b201e60c5ce1 bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=032b141a91a82a5f0107ce664a35b201e60c5ce1 -------------------------------- [ Upstream commit c8c80c99 ] As the possible failure of the kzalloc(), the 'new_ts' could be NULL pointer. Therefore, it should be better to check it in order to avoid the dereference of the NULL pointer. Also, the caller esparser_queue() needs to deal with the return value of the amvdec_add_ts(). Fixes: 876f123b ("media: meson: vdec: bring up to compliance") Signed-off-by: NJiasheng Jiang <jiasheng@iscas.ac.cn> Suggested-by: NNeil Armstrong <narmstrong@baylibre.com> Reviewed-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NYu Liao <liaoyu15@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录