[PATCH s3] Add missing call to vbeFree (bug 4417)

Matt Turner mattst88 at gmail.com
Thu Dec 2 14:11:51 PST 2010


Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
Why are we doing VBEInit if we're not subsequently calling vbeDoEDID?

 src/s3.h        |    1 -
 src/s3_driver.c |    4 +++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/s3.h b/src/s3.h
index 49b8a54..0875fc9 100644
--- a/src/s3.h
+++ b/src/s3.h
@@ -113,7 +113,6 @@ typedef struct _S3Rec {
         XAAInfoRecPtr           pXAA;
 	xf86CursorInfoPtr	pCurs;
 	xf86Int10InfoPtr	pInt10;
-	vbeInfoPtr		pVBE;
         XF86VideoAdaptorPtr     adaptor;
         S3PortPrivPtr           portPrivate;
 
diff --git a/src/s3_driver.c b/src/s3_driver.c
index 29e343d..4519b33 100644
--- a/src/s3_driver.c
+++ b/src/s3_driver.c
@@ -309,6 +309,7 @@ static Bool S3PreInit(ScrnInfoPtr pScrn, int flags)
 	S3Ptr pS3;
 	vgaHWPtr hwp;
 	ClockRangePtr clockRanges;
+	vbeInfoPtr pVBE;
 	rgb zeros = {0, 0, 0};
 	Gamma gzeros = {0.0, 0.0, 0.0};
 	int i, vgaCRIndex, vgaCRReg;
@@ -436,7 +437,8 @@ static Bool S3PreInit(ScrnInfoPtr pScrn, int flags)
 	}
 
 	if (xf86LoadSubModule(pScrn, "vbe")) {
-		pS3->pVBE = VBEInit(pS3->pInt10, pEnt->index);
+		pVBE = VBEInit(pS3->pInt10, pEnt->index);
+		vbeFree(pVBE);
 	}
 	
 	if (pS3->shadowFB) {
-- 
1.7.2.2



More information about the xorg-devel mailing list