aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Slusarz2010-01-12 08:32:39 -0600
committerMaarten Maathuis2010-01-15 16:02:48 -0600
commita03dcc21040775e660afcfc3dc37a324d2dd2ed3 (patch)
treed94d47b8c74780bcddd133c04982f3ac8cf2ffca /nouveau
parent2959266188dd564975503d74e24b55013f58f861 (diff)
downloadlibdrm-a03dcc21040775e660afcfc3dc37a324d2dd2ed3.tar.gz
libdrm-a03dcc21040775e660afcfc3dc37a324d2dd2ed3.tar.xz
libdrm-a03dcc21040775e660afcfc3dc37a324d2dd2ed3.zip
nouveau: fix memory leak in nouveau_channel_free
Diffstat (limited to 'nouveau')
-rw-r--r--nouveau/nouveau_channel.c4
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)
102 struct nouveau_channel_priv *nvchan; 102 struct nouveau_channel_priv *nvchan;
103 struct nouveau_device_priv *nvdev; 103 struct nouveau_device_priv *nvdev;
104 struct drm_nouveau_channel_free cf; 104 struct drm_nouveau_channel_free cf;
105 int i;
105 106
106 if (!chan || !*chan) 107 if (!chan || !*chan)
107 return; 108 return;
@@ -115,6 +116,9 @@ nouveau_channel_free(struct nouveau_channel **chan)
115 nouveau_bo_unmap(nvchan->notifier_bo); 116 nouveau_bo_unmap(nvchan->notifier_bo);
116 nouveau_bo_ref(NULL, &nvchan->notifier_bo); 117 nouveau_bo_ref(NULL, &nvchan->notifier_bo);
117 118
119 for (i = 0; i < nvchan->drm.nr_subchan; i++)
120 free(nvchan->base.subc[i].gr);
121
118 nouveau_grobj_free(&nvchan->base.vram); 122 nouveau_grobj_free(&nvchan->base.vram);
119 nouveau_grobj_free(&nvchan->base.gart); 123 nouveau_grobj_free(&nvchan->base.gart);
120 nouveau_grobj_free(&nvchan->base.nullobj); 124 nouveau_grobj_free(&nvchan->base.nullobj);