src/via_driver.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit 91ad6eac6362b74c24c626832697f097a7698aa8 Author: James Simmons <[email protected]> Date: Sun Dec 2 15:42:17 2012 -0500 Fix a double free when exiting the xorg server diff --git a/src/via_driver.c b/src/via_driver.c index cacdbd3..898b649 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -418,8 +418,13 @@ VIAFreeRec(ScrnInfoPtr pScrn) VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; - if (pBIOSInfo) + if (pBIOSInfo->TVI2CDev) + xf86DestroyI2CDevRec(pBIOSInfo->TVI2CDev, TRUE); + + if (pBIOSInfo) { + pVia->pBIOSInfo = NULL; free(pBIOSInfo); + } if (VIAPTR(pScrn)->pVbe) vbeFree(VIAPTR(pScrn)->pVbe); @@ -427,10 +432,6 @@ VIAFreeRec(ScrnInfoPtr pScrn) if (pVia->VideoRegs) free(pVia->VideoRegs); - if (((VIARec *) (pScrn->driverPrivate))->pBIOSInfo->TVI2CDev) - xf86DestroyI2CDevRec((((VIARec *) (pScrn->driverPrivate))->pBIOSInfo->TVI2CDev), TRUE); - free(((VIARec *) (pScrn->driverPrivate))->pBIOSInfo); - VIAUnmapMem(pScrn); free(pScrn->driverPrivate); _______________________________________________ Openchrome-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/openchrome-devel
