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:
parent
4458c5639b
commit
bad4274a69
1 changed files with 3 additions and 1 deletions
|
@ -84,8 +84,10 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = pm_runtime_get_sync(dev);
|
ret = pm_runtime_get_sync(dev);
|
||||||
if (ret < 0 && ret != -EACCES)
|
if (ret < 0 && ret != -EACCES) {
|
||||||
|
kfree(vma);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = nouveau_bo_vma_add(nvbo, cli->vm, vma);
|
ret = nouveau_bo_vma_add(nvbo, cli->vm, vma);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue