提交 efe8b031 编写于 作者: C Colin Ian King 提交者: Mauro Carvalho Chehab

media: stv090x: fix double free on state object

There two callers of stv090x_setup_compound manage the allocation and
freeing if state there is an error condition from stv090x_setup_compound.
Currently function stv090x_setup_compound also frees the state object
too, leading to a double free in the callers of this function.  Fix
this by removing the extraneous free in stv090x_setup_compound and just
leave the callers handle the allocation/free'ing.
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
上级 575f6031
......@@ -4942,7 +4942,6 @@ static int stv090x_setup_compound(struct stv090x_state *state)
return 0;
error:
kfree(state);
return -ENOMEM;
err_remove:
remove_dev(state->internal);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册