[PATCH] dix: free default colormap before screen deletion
Dave Airlie
airlied at gmail.com
Thu Aug 23 20:25:05 PDT 2012
From: Dave Airlie <airlied at redhat.com>
If we don't free this here, it gets freed later in the resource
cleanups, however it then looks up up pmap->pScreen, which we
freed already in this function. So free the default colormap
when we should.
This fixes a bug after a couple of hotplug cycles when you try
to exit the X server and it crashes.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
dix/dispatch.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 3c6a591..e002574 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3904,6 +3904,8 @@ RemoveGPUScreen(ScreenPtr pScreen)
}
screenInfo.numGPUScreens--;
+ if (pScreen->defColormap)
+ FreeResource(pScreen->defColormap, RT_COLORMAP);
free(pScreen);
}
--
1.7.11.2
More information about the xorg-devel
mailing list