mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-17 08:24:34 -05:00
drm/nouveau/gem: fix object reference leak in a failure path
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user