drm/nouveau: fix memory leak

If pm_runtime_get_sync() we were going to "out" but we missed freeing
vma.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Sudip Mukherjee 2015-09-11 15:00:56 +05:30 committed by Ben Skeggs
parent 4458c5639b
commit bad4274a69
1 changed files with 3 additions and 1 deletions

View File

@ -84,8 +84,10 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
}
ret = pm_runtime_get_sync(dev);
if (ret < 0 && ret != -EACCES)
if (ret < 0 && ret != -EACCES) {
kfree(vma);
goto out;
}
ret = nouveau_bo_vma_add(nvbo, cli->vm, vma);
if (ret)