diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2012-12-10 21:59:52 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-01-13 18:07:44 +1000 |
commit | dd5700ea98ad0b375a72525ce7d7edddf15b2693 (patch) | |
tree | fe03dceda8c142e5d18adcb0619afeeafd3f06e9 /drivers/gpu/drm/nouveau/core/include | |
parent | 82c805abb20946dcb343cd607327e4d720bf6b28 (diff) |
drm/nouveau: fix nouveau_client allocation failure path
Depending on the point of failure, freed object would be returned
or memory leak would happen.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/core/client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/core/client.h b/drivers/gpu/drm/nouveau/core/include/core/client.h index 0193532ceac9..63acc0346ff2 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/client.h +++ b/drivers/gpu/drm/nouveau/core/include/core/client.h @@ -36,6 +36,9 @@ nouveau_client(void *obj) int nouveau_client_create_(const char *name, u64 device, const char *cfg, const char *dbg, int, void **); +#define nouveau_client_destroy(p) \ + nouveau_namedb_destroy(&(p)->base) + int nouveau_client_init(struct nouveau_client *); int nouveau_client_fini(struct nouveau_client *, bool suspend); |