This is an automatic generated email to let you know that the following patch were queued:
Subject: media: cedrus: fix double free Author: Daniel Almeida <[email protected]> Date: Fri Jul 2 03:01:28 2021 +0100 If v4l2_ctrl_new_custom fails in cedrus_init_ctrls the error path will free ctx->ctrls, which is also freed in cedrus release. Fix this by setting ctx->ctrls to NULL instead of inadvertently removing kfree calls. Signed-off-by: Daniel Almeida <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/staging/media/sunxi/cedrus/cedrus.c | 1 + 1 file changed, 1 insertion(+) --- diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c index 9dd30cb568e8..c76fc97d97a0 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c @@ -259,6 +259,7 @@ static int cedrus_init_ctrls(struct cedrus_dev *dev, struct cedrus_ctx *ctx) v4l2_ctrl_handler_free(hdl); kfree(ctx->ctrls); + ctx->ctrls = NULL; return hdl->error; } _______________________________________________ linuxtv-commits mailing list [email protected] https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
