“5192ec7b24dd78bd82fe554995b8889d317da0c1”上不存在“drivers/pci/controller/dwc/pci-layerscape.c”
提交 f5654d95 编写于 作者: T Thierry Reding 提交者: Ben Skeggs

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: NThierry Reding <treding@nvidia.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 96945546
...@@ -128,6 +128,7 @@ nouveau_cli_destroy(struct nouveau_cli *cli) ...@@ -128,6 +128,7 @@ nouveau_cli_destroy(struct nouveau_cli *cli)
nvkm_vm_ref(NULL, &nvxx_client(&cli->base)->vm, NULL); nvkm_vm_ref(NULL, &nvxx_client(&cli->base)->vm, NULL);
nvif_client_fini(&cli->base); nvif_client_fini(&cli->base);
usif_client_fini(cli); usif_client_fini(cli);
kfree(cli);
} }
static void static void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册