LinuxTV Patchwork [v5,09/23] media: vicodec: bugfix: free compressed_frame upon device release

login
register
mail settings
Submitter Dafna Hirschfeld
Date March 6, 2019, 9:13 p.m.
Message ID <20190306211343.15302-10-dafna3@gmail.com>
Download mbox | patch
Permalink /patch/54898/
State Under Review
Delegated to: Hans Verkuil
Headers show

Comments

Dafna Hirschfeld - March 6, 2019, 9:13 p.m.
Free compressed_frame buffer upon device release.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
---
 drivers/media/platform/vicodec/vicodec-core.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c
index 8205a602bb38..8128ea6d1948 100644
--- a/drivers/media/platform/vicodec/vicodec-core.c
+++ b/drivers/media/platform/vicodec/vicodec-core.c
@@ -1614,6 +1614,7 @@  static int vicodec_release(struct file *file)
 	v4l2_fh_del(&ctx->fh);
 	v4l2_fh_exit(&ctx->fh);
 	v4l2_ctrl_handler_free(&ctx->hdl);
+	kvfree(ctx->state.compressed_frame);
 	kfree(ctx);
 
 	return 0;

Privacy Policy