Commit 6286ef9b authored by Dan Carpenter's avatar Dan Carpenter Committed by Daniel Vetter

drm/i915: use after free on error path

i915_gem_vma_destroy() frees its argument so we have to move the
drm_mm_remove_node() call up a few lines.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent db473b36
......@@ -3182,9 +3182,9 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
return 0;
err_out:
drm_mm_remove_node(&vma->node);
i915_gem_vma_destroy(vma);
i915_gem_object_unpin_pages(obj);
drm_mm_remove_node(&vma->node);
return ret;
}
......
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