提交 51f07b7e 编写于 作者: D Dave Airlie

drm/radeon/gem: don't leak a gem object if reserve fails on get tiling (v2)

Not sure it ever happens in practice, spotted during code review.

spare brace snuck in
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 ecabd32a
......@@ -351,9 +351,10 @@ int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
rbo = gobj->driver_private;
r = radeon_bo_reserve(rbo, false);
if (unlikely(r != 0))
return r;
goto out;
radeon_bo_get_tiling_flags(rbo, &args->tiling_flags, &args->pitch);
radeon_bo_unreserve(rbo);
out:
mutex_lock(&dev->struct_mutex);
drm_gem_object_unreference(gobj);
mutex_unlock(&dev->struct_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册