Commit bad4274a authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Ben Skeggs

drm/nouveau: fix memory leak

If pm_runtime_get_sync() we were going to "out" but we missed freeing
vma.
Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 4458c563
...@@ -84,8 +84,10 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) ...@@ -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)
......
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