build/patch/kernel/archive/sunxi-5.15/patches.megous/media-cedrus-Fix-missing-cleanup-in-error-path.patch

28 lines
843 B
Diff

From afc209989a2e28a42fa0655331775fd324ba8230 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 5 Apr 2020 21:16:40 -0500
Subject: [PATCH 281/478] media: cedrus: Fix missing cleanup in error path
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
drivers/staging/media/sunxi/cedrus/cedrus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index c0d005dafc6c..aab12fb96a9b 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -301,7 +301,9 @@ static int cedrus_open(struct file *file)
err_ctrls:
v4l2_ctrl_handler_free(&ctx->hdl);
+ kfree(ctx->ctrls);
err_free:
+ v4l2_fh_exit(&ctx->fh);
kfree(ctx);
mutex_unlock(&dev->dev_mutex);
--
2.35.3