media: vicodec: bugfix: free compressed_frame upon device release
authorDafna Hirschfeld <dafna3@gmail.com>
Wed, 6 Mar 2019 21:13:29 +0000 (16:13 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 17:42:19 +0000 (13:42 -0400)
Free compressed_frame buffer upon device release.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/vicodec-core.c

index 11fbc44973b2ba81585a369f2d764c74e993350d..41e09b558a8860d739c5b5adbd63bd8e2a202ce4 100644 (file)
@@ -1628,6 +1628,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;