fc485147fb
- fix two recycle/exit crashes
35 lines
971 B
Diff
35 lines
971 B
Diff
From a8cb70389bdcd82ed952449de307ecb2a633ebe7 Mon Sep 17 00:00:00 2001
|
|
From: Dave Airlie <airlied@redhat.com>
|
|
Date: Fri, 24 Aug 2012 13:23:01 +1000
|
|
Subject: [PATCH 2/2] dix: free default colormap before screen deletion
|
|
|
|
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@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
|
|
|