summaryrefslogtreecommitdiff
path: root/src/r128_driver.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2009-06-13 19:20:24 +0200
committerMatthieu Herrb <matthieu.herrb@laas.fr>2009-06-13 19:20:24 +0200
commit5d8a8df3aca2f14366946e48df9b674d7254ce04 (patch)
tree84407480da41d781b22f8c5a370da47fed333a16 /src/r128_driver.c
parent771c707eb2bba21b6013327bb62859c37be08673 (diff)
Don't de-reference a NULL pointer in R128FreeScreen in the error path.
If R128PreInit() failed, R128FreeRec() was already called and info will be NULL.
Diffstat (limited to 'src/r128_driver.c')
-rw-r--r--src/r128_driver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/r128_driver.c b/src/r128_driver.c
index e3d7bb3..f42acb6 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -4337,6 +4337,8 @@ void R128FreeScreen(int scrnIndex, int flags)
R128InfoPtr info = R128PTR(pScrn);
R128TRACE(("R128FreeScreen\n"));
+ if (info == NULL)
+ return;
#ifdef WITH_VGAHW
if (info->VGAAccess && xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
vgaHWFreeHWRec(pScrn);