Skip to contentSkip to conversation

nouveau: fix memory leak in nouveau_channel_free

PATCH In review Marcin Slusarz 2 participants 4 messages Jan 12, 2010 – Jan 14, 2010 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nouveau: fix memory leak in nouveau_channel_free

From: Marcin Slusarz <[email protected]>
Subject: [libdrm PATCH] nouveau: fix memory leak in nouveau_channel_free

---
 nouveau/nouveau_channel.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
nouveau/nouveau_channel.c +4 -0
index 638aee3..14cf4c6 100644
@@ -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);
Signature · 1 line
1.6.6.rc3

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Could you resend these (not just this one) patches as proper git send-email patches, those have authorship too, so they can be used with git am.

Maarten.

Quoted 37 lines · Marcin Slusarz

From: Marcin Slusarz <[email protected]>
Subject: [libdrm PATCH] nouveau: fix memory leak in nouveau_channel_free

---
 nouveau/nouveau_channel.c |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)
nouveau/nouveau_channel.c +4 -1
index 638aee3..14cf4c6 100644
@@ -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);
--

1.6.6.rc3

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 6d4bc9fc1001141430g6a8afa20jadcdf855993fb446-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw

Sorry, this was a brainfart.

Quoted 46 lines · Maarten Maathuis

Could you resend these (not just this one) patches as proper git send-email patches, those have authorship too, so they can be used with git am.

Maarten.

Quoted 37 lines · Marcin Slusarz

From: Marcin Slusarz <[email protected]>
Subject: [libdrm PATCH] nouveau: fix memory leak in nouveau_channel_free

---
 nouveau/nouveau_channel.c |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)
nouveau/nouveau_channel.c +4 -1
index 638aee3..14cf4c6 100644
@@ -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);
--

1.6.6.rc3

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 6d4bc9fc1001141454r41481947o705cb8b425e8e8ba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

I'll push this one tomorrow.

Quoted 50 lines · Maarten Maathuis

Sorry, this was a brainfart.

Quoted 46 lines · Maarten Maathuis

Could you resend these (not just this one) patches as proper git send-email patches, those have authorship too, so they can be used with git am.

Maarten.

Quoted 37 lines · Marcin Slusarz

From: Marcin Slusarz <[email protected]>
Subject: [libdrm PATCH] nouveau: fix memory leak in nouveau_channel_free

---
 nouveau/nouveau_channel.c |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)
nouveau/nouveau_channel.c +4 -1
index 638aee3..14cf4c6 100644
@@ -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);
--

1.6.6.rc3

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau