提交 f7f18184 编写于 作者: B Ben Widawsky 提交者: Daniel Vetter

drm/i915: Free stolen node on failed preallocation

The odds of this happening are *extremely* unlikely.
Reported-by: NImre Deak <imre.deak@intel.com>
Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 5cef07e1
......@@ -402,7 +402,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
&obj->gtt_space);
if (ret) {
DRM_DEBUG_KMS("failed to allocate stolen GTT space\n");
goto unref_out;
goto err_out;
}
}
......@@ -413,7 +413,8 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
return obj;
unref_out:
err_out:
drm_mm_put_block(stolen);
drm_gem_object_unreference(&obj->base);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册