forked from luck/tmp_suning_uos_patched
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: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
575f60312b
commit
efe8b031d8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user