Commit 5086f69e authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/gem: fix object reference leak in a failure path

Reported-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
parent 887cd788
......@@ -342,6 +342,7 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
NV_ERROR(dev, "multiple instances of buffer %d on "
"validation list\n", b->handle);
drm_gem_object_unreference_unlocked(gem);
validate_fini(op, NULL);
return -EINVAL;
}
......
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