1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-24 10:16:18 +00:00
Lakka-LibreELEC/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0120-WIP-media-meson-vdec-fix-memory-leak-of-new_frame.patch
Christian Hewitt a798e0b5d8
linux: update Amlogic 6.1.y patches
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
2023-03-17 15:40:34 +00:00

30 lines
1.0 KiB
Diff

From ffd9b1381e35fb4244a7173dfa8fbddfcc37c195 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 14 Mar 2023 01:13:15 +0000
Subject: [PATCH 120/120] WIP: media: meson: vdec: fix memory leak of
'new_frame'
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202303120441.YFGHDOya-lkp@intel.com/
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
drivers/staging/media/meson/vdec/codec_hevc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/meson/vdec/codec_hevc.c b/drivers/staging/media/meson/vdec/codec_hevc.c
index fcaaa1ad50b8..b0d8623c3c7d 100644
--- a/drivers/staging/media/meson/vdec/codec_hevc.c
+++ b/drivers/staging/media/meson/vdec/codec_hevc.c
@@ -731,6 +731,7 @@ codec_hevc_prepare_new_frame(struct amvdec_session *sess)
vbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx);
if (!vbuf) {
dev_err(sess->core->dev, "No dst buffer available\n");
+ kfree(new_frame);
return NULL;
}
--
2.34.1