media: ir_toy: fix a memleak in irtoy_tx
[ Upstream commit dc9ceb90 ] 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>
Please register or sign in to comment