Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418006 > unrolled thread

[PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove()

Started byShuah Khan <shuahkh@osg.samsung.com>
First post2016-06-09 03:40 +0200
Last post2016-06-09 03:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove() Shuah Khan <shuahkh@osg.samsung.com> - 2016-06-09 03:40 +0200

#1418006 — [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove()

FromShuah Khan <shuahkh@osg.samsung.com>
Date2016-06-09 03:40 +0200
Subject[PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove()
Message-ID<rHX6V-7Ur-3@gated-at.bofh.it>
s5p_mfc_remove() fails to release encoder and decoder video devices.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 274b4f1..af61f54 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1317,7 +1317,9 @@ static int s5p_mfc_remove(struct platform_device *pdev)
 	destroy_workqueue(dev->watchdog_workqueue);
 
 	video_unregister_device(dev->vfd_enc);
+	video_device_release(dev->vfd_enc);
 	video_unregister_device(dev->vfd_dec);
+	video_device_release(dev->vfd_dec);
 	v4l2_device_unregister(&dev->v4l2_dev);
 	s5p_mfc_release_firmware(dev);
 	vb2_dma_contig_cleanup_ctx(dev->alloc_ctx[0]);
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web