提交 c3eb9e51 编写于 作者: S Stanimir Varbanov 提交者: Mauro Carvalho Chehab

[media] media: venus: venc: fix compile error in venc_close

This fixes the following compile error ocured when building
with gcc7:

drivers/media/platform/qcom/venus/venc.c:1150
venc_close() error: dereferencing freed memory 'inst'

by moving kfree as a last call.
Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 17571ed6
......@@ -1145,10 +1145,10 @@ static int venc_close(struct file *file)
mutex_destroy(&inst->lock);
v4l2_fh_del(&inst->fh);
v4l2_fh_exit(&inst->fh);
kfree(inst);
pm_runtime_put_sync(inst->core->dev_enc);
kfree(inst);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册