From bf585ad38a80f7828b821936296316bcee4658f5 Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sat, 11 Oct 2008 01:22:35 +0200 Subject: [PATCH] The fifo channel should be removed along with closing of the fd, so only clear the client memory. --- src/nv_dri.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nv_dri.c b/src/nv_dri.c index a65a6b7..e83f938 100644 --- a/src/nv_dri.c +++ b/src/nv_dri.c @@ -427,14 +427,16 @@ void NVDRICloseScreen(ScrnInfoPtr pScrn) ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; NVPtr pNv = NVPTR(pScrn); - /* close fifo channel so it won't fail on open for next server generation. */ - nouveau_channel_free(&pNv->chan); - - /* this may not work for kernel modesetting, so i'm leaving a note. */ nouveau_device_close(&pNv->dev); DRICloseScreen(pScreen); + /* The channel should have been removed from the drm side, that still leaves a memory leak though. */ + if (pNv->chan) { + free(pNv->chan); + pNv->chan = NULL; + } + if (pNv->pDRIInfo) { if (pNv->pDRIInfo->devPrivate) { xfree(pNv->pDRIInfo->devPrivate); -- 2.32.0.93.g670b81a890