Loading
media: ir_toy: fix a memleak in irtoy_tx
stable inclusion from stable-v5.10.210 commit 486a4176bc783df798bce2903824801af8d2c3ae category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9HJP4 CVE: CVE-2024-26829 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=486a4176bc783df798bce2903824801af8d2c3ae -------------------------------- [ Upstream commit dc9ceb90c4b42c6e5c6757df1d6257110433788e ] When irtoy_command fails, buf should be freed since it is allocated by irtoy_tx, or there is a memleak. Fixes: 4114978d ("media: ir_toy: prevent device from hanging during transmit") Signed-off-by:Zhipeng Lu <alexious@zju.edu.cn> Signed-off-by:
Sean Young <sean@mess.org> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Lin Yujun <linyujun809@huawei.com> Signed-off-by:
Cui GaoSheng <cuigaosheng1@huawei.com>