drm/i915/selftest: Fix potential memory leak
authorPan Bian <bianpan2016@163.com>
Fri, 22 Jan 2021 01:56:40 +0000 (17:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:28:43 +0000 (23:28 +0100)
commit921f48afdd3a7a3178c7a26fcb080277443a93cf
tree583e4a866643acfb611231b1958951adb7139920
parent7306177c9ed33008376b7d41e39601c308e7a40e
drm/i915/selftest: Fix potential memory leak

commit 3d480fe1befa0ef434f5c25199e7d45c26870555 upstream.

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: a47e788c2310 ("drm/i915/selftests: Exercise CS TLB invalidation")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris 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: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c