diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2010-01-12 15:32:39 +0100 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2010-01-15 23:02:48 +0100 |
commit | a03dcc21040775e660afcfc3dc37a324d2dd2ed3 (patch) | |
tree | d94d47b8c74780bcddd133c04982f3ac8cf2ffca /nouveau | |
parent | 2959266188dd564975503d74e24b55013f58f861 (diff) |
nouveau: fix memory leak in nouveau_channel_free
Diffstat (limited to 'nouveau')
-rw-r--r-- | nouveau/nouveau_channel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nouveau/nouveau_channel.c b/nouveau/nouveau_channel.c index 638aee30..14cf4c6f 100644 --- a/nouveau/nouveau_channel.c +++ b/nouveau/nouveau_channel.c @@ -102,6 +102,7 @@ nouveau_channel_free(struct nouveau_channel **chan) struct nouveau_channel_priv *nvchan; struct nouveau_device_priv *nvdev; struct drm_nouveau_channel_free cf; + int i; if (!chan || !*chan) return; @@ -115,6 +116,9 @@ nouveau_channel_free(struct nouveau_channel **chan) nouveau_bo_unmap(nvchan->notifier_bo); nouveau_bo_ref(NULL, &nvchan->notifier_bo); + for (i = 0; i < nvchan->drm.nr_subchan; i++) + free(nvchan->base.subc[i].gr); + nouveau_grobj_free(&nvchan->base.vram); nouveau_grobj_free(&nvchan->base.gart); nouveau_grobj_free(&nvchan->base.nullobj); |