Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17571ed6 authored by Stanimir Varbanov's avatar Stanimir Varbanov Committed by Mauro Carvalho Chehab
Browse files

[media] media: venus: vdec: fix compile error in vdec_close



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

drivers/media/platform/qcom/venus/vdec.c:1022
vdec_close() error: dereferencing freed memory 'inst'

by moving kfree as a last call.

Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 832d4671
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1017,9 +1017,10 @@ static int vdec_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_dec);

	kfree(inst);
	return 0;
}