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

28 lines
843 B
Diff

From 109d3695faeb60cce56321e20ab849b3bc3ce3e5 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 5 Apr 2020 21:16:40 -0500
Subject: [PATCH 174/389] 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 55c54dfdc585..9d7fa19cab2c 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -380,7 +380,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