nouveau: fix memory leak in nouveau_channel_free
parent
2959266188
commit
a03dcc2104
|
@ -102,6 +102,7 @@ nouveau_channel_free(struct nouveau_channel **chan)
|
||||||
struct nouveau_channel_priv *nvchan;
|
struct nouveau_channel_priv *nvchan;
|
||||||
struct nouveau_device_priv *nvdev;
|
struct nouveau_device_priv *nvdev;
|
||||||
struct drm_nouveau_channel_free cf;
|
struct drm_nouveau_channel_free cf;
|
||||||
|
int i;
|
||||||
|
|
||||||
if (!chan || !*chan)
|
if (!chan || !*chan)
|
||||||
return;
|
return;
|
||||||
|
@ -115,6 +116,9 @@ nouveau_channel_free(struct nouveau_channel **chan)
|
||||||
nouveau_bo_unmap(nvchan->notifier_bo);
|
nouveau_bo_unmap(nvchan->notifier_bo);
|
||||||
nouveau_bo_ref(NULL, &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.vram);
|
||||||
nouveau_grobj_free(&nvchan->base.gart);
|
nouveau_grobj_free(&nvchan->base.gart);
|
||||||
nouveau_grobj_free(&nvchan->base.nullobj);
|
nouveau_grobj_free(&nvchan->base.nullobj);
|
||||||
|
|
Loading…
Reference in New Issue