diff options
author | Thierry Reding <treding@nvidia.com> | 2014-10-16 13:54:54 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-07-27 11:56:07 +0300 |
commit | f5654d9555b470d05be9d6d26cfb8fb79239ac3e (patch) | |
tree | 16a23be0e0970976569e5f70bd70e6d6079e4631 /drivers/gpu/drm/nouveau/nouveau_drm.c | |
parent | 9694554691d26226f84fa1d6f500b7e7c9288510 (diff) | |
download | linux-f5654d9555b470d05be9d6d26cfb8fb79239ac3e.tar.xz |
drm/nouveau: Do not leak client objects
The memory allocated for a nouveau_cli object in nouveau_cli_create() is
never freed. Free the memory in nouveau_cli_destroy() to plug this leak.
kmemleak recorded this after running a couple of nouveau test programs.
Note that kmemleak points at drm_open_helper() because for some reason
it thinks that skipping the first two stack frames is a good idea.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 01c78a4a3efa..477cbb12809b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -128,6 +128,7 @@ nouveau_cli_destroy(struct nouveau_cli *cli) nvkm_vm_ref(NULL, &nvxx_client(&cli->base)->vm, NULL); nvif_client_fini(&cli->base); usif_client_fini(cli); + kfree(cli); } static void |