Commit 3d480fe1 authored by Pan Bian's avatar Pan Bian Committed by Jani Nikula

drm/i915/selftest: Fix potential memory leak

Object out is not released on path that no VMA instance found. The root
cause is jumping to an unexpected label on the error path.

Fixes: a47e788c ("drm/i915/selftests: Exercise CS TLB invalidation")
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20210122015640.16002-1-bianpan2016@163.com
(cherry picked from commit 2b015017d5cb01477a79ca184ac25c247d664568)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 8f6d08c9
...@@ -1880,7 +1880,7 @@ static int igt_cs_tlb(void *arg) ...@@ -1880,7 +1880,7 @@ static int igt_cs_tlb(void *arg)
vma = i915_vma_instance(out, vm, NULL); vma = i915_vma_instance(out, vm, NULL);
if (IS_ERR(vma)) { if (IS_ERR(vma)) {
err = PTR_ERR(vma); err = PTR_ERR(vma);
goto out_put_batch; goto out_put_out;
} }
err = i915_vma_pin(vma, 0, 0, err = i915_vma_pin(vma, 0, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment