xf86-video-ati: Branch 'master' - 2 commits

Alex Deucher agd5f at kemper.freedesktop.org
Tue Mar 10 06:54:34 PDT 2009


 src/radeon_driver.c |   37 ++++++++++++++++++++++++++++++++-----
 1 file changed, 32 insertions(+), 5 deletions(-)

New commits:
commit 945ccbbd4fa2b65ccdfb23716c178c95b036734d
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Tue Mar 10 09:53:14 2009 -0400

    radeon: clean more thoroughly in RADEONFreeRec()

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index f56a292..2456dc5 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -348,7 +348,39 @@ static Bool RADEONGetRec(ScrnInfoPtr pScrn)
 /* Free our private RADEONInfoRec */
 static void RADEONFreeRec(ScrnInfoPtr pScrn)
 {
+    RADEONInfoPtr  info;
+    int i;
+
     if (!pScrn || !pScrn->driverPrivate) return;
+
+    info = RADEONPTR(pScrn);
+
+    if (info->cp) {
+	xfree(info->cp);
+	info->cp = NULL;
+    }
+
+    if (info->dri) {
+	xfree(info->dri);
+	info->dri = NULL;
+    }
+
+    if (info->accel_state) {
+	xfree(info->accel_state);
+	info->accel_state = NULL;
+    }
+
+    for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) {
+	if (info->encoders[i]) {
+	    if (info->encoders[i]->dev_priv) {
+		xfree(info->encoders[i]->dev_priv);
+		info->encoders[i]->dev_priv = NULL;
+	    }
+	    xfree(info->encoders[i]);
+	    info->encoders[i]= NULL;
+	}
+    }
+
     xfree(pScrn->driverPrivate);
     pScrn->driverPrivate = NULL;
 }
commit 03ec2099fdc859b23e5fa56ac8696ec045f1b110
Author: 오유연(Yu-yeon Oh) <yuyeon_oh at tmax.co.kr>
Date:   Tue Mar 10 09:51:08 2009 -0400

    radeon_driver.c small memory bug

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index b665033..f56a292 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2181,11 +2181,6 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn)
 	return FALSE;
     }
 
-    if (!(info->dri = xcalloc(1, sizeof(struct radeon_dri)))) {
-	ErrorF("Unable to allocate dri rec!\n");
-	return FALSE;
-    }
-
     info->dri->pLibDRMVersion = NULL;
     info->dri->pKernelDRMVersion = NULL;
 


More information about the xorg-commit mailing list