summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2006-01-13 01:02:01 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2006-01-13 01:02:01 +0000
commitac296d9137b02753bc79a9930d168855adea9c95 (patch)
treea17a96dbd6b03c47c6080ba2d097353e4f281fb1
parentdd98ce78407c9eddd7adaad1d73d6910e6949b87 (diff)
When failing to parse MetaModes, reset CRT2pScrn to NULL after free'ing it
so we don't crash when trying to use it later (such as in RADEONFreeRec).
-rw-r--r--ChangeLog7
-rw-r--r--src/radeon_driver.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c398d8..fa89c35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-01-12 Alan Coopersmith <alan.coopersmith@sun.com>
+
+ * src/radeon_driver.c (RADEONPreInitModes):
+ When failing to parse MetaModes, reset CRT2pScrn to NULL after
+ free'ing it so we don't crash when trying to use it later
+ (such as in RADEONFreeRec).
+
2006-01-08 Adam Jackson <ajax@freedesktop.org>
* src/radeon.h:
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index b78322f..163ea6e 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1,4 +1,5 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.117 2004/02/19 22:38:12 tsi Exp $ */
+/* $XdotOrg: $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -4185,6 +4186,7 @@ static Bool RADEONPreInitModes(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
xfree(info->CRT2pScrn->monitor);
}
xfree(info->CRT2pScrn);
+ info->CRT2pScrn = NULL;
}
pScrn->modes = info->CRT1Modes;
info->CRT1Modes = NULL;