armbian_build/patch/kernel/archive/sunxi-5.10/megous/media-cedrus-Fix-missing-cleanup-in-error-path.patch
The-going 7964a578f5
Patches megous 5.10 (#3293)
* Add a series of patches for sunxi 5.10

Patches from the repository
https://github.com/megous/linux branches of orange-pi-5.10

* Patches adapted to the kernel version v5.10.81

* Remove unnecessary patches 5.10.19-5.10.75

* Kernel switch tag=v5.10.81 for the current sunxi

* Adjust broken patches, build tested on sunxi and sunxi64

* Remove patch added by mistake

Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
2021-11-27 00:48:30 +01:00

28 lines
837 B
Diff

From 11c9f55bdfd01ef34cc6967af6c6606108f98a1b Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 5 Apr 2020 21:16:40 -0500
Subject: [PATCH 182/323] 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 1dd833757..5e3395aaa 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -331,7 +331,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.34.0