diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-06-11 11:38:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-21 15:33:07 -0400 |
commit | efe8b031d8eb92ef8c68efd05ca5c11a1050619a (patch) | |
tree | 9153e9b73ae146b1ee05132e78fa66dfa1007838 /drivers/media/dvb-frontends/stv090x.c | |
parent | 575f60312b3c5036385e95f61737da5a9e72f0ad (diff) | |
download | linux-stable-efe8b031d8eb92ef8c68efd05ca5c11a1050619a.tar.gz linux-stable-efe8b031d8eb92ef8c68efd05ca5c11a1050619a.tar.bz2 linux-stable-efe8b031d8eb92ef8c68efd05ca5c11a1050619a.zip |
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>
Diffstat (limited to 'drivers/media/dvb-frontends/stv090x.c')
-rw-r--r-- | drivers/media/dvb-frontends/stv090x.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c index 986e585e0103..90d24131d335 100644 --- a/drivers/media/dvb-frontends/stv090x.c +++ b/drivers/media/dvb-frontends/stv090x.c @@ -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); |