nouveau: fix memory leak in nouveau_channel_free
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
@@ -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]
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 innouveau_channel_free---
nouveau/nouveau_channel.c | 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)nouveau/nouveau_channel.c +4
-1@@ -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
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 innouveau_channel_free---
nouveau/nouveau_channel.c | 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)nouveau/nouveau_channel.c +4
-1@@ -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
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 innouveau_channel_free---
nouveau/nouveau_channel.c | 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)nouveau/nouveau_channel.c +4
-1@@ -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