From 34c9aaa9827e7acc3b1e3126cc6b377b85cdc999 Mon Sep 17 00:00:00 2001 From: Roland Baer Date: Mon, 6 Aug 2007 13:37:01 +0300 Subject: [PATCH] Some Radeon mem leaks fixes --- src/radeon_modes.c | 2 ++ src/radeon_probe.c | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/radeon_modes.c b/src/radeon_modes.c index 1a63971..b91281e 100644 --- a/src/radeon_modes.c +++ b/src/radeon_modes.c @@ -763,8 +763,10 @@ int RADEONValidateMergeModes(ScrnInfoPtr pScrn1) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid mode found for this DFP/LCD\n"); } + xfree(clockRanges); return 0; } } + xfree(clockRanges); return modesFound; } diff --git a/src/radeon_probe.c b/src/radeon_probe.c index d7ff643..dbc3075 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -303,6 +303,10 @@ RADEONProbe(DriverPtr drv, int flags) foundScreen = TRUE; } + /* Maybe, instead of xfree'ing, eliminate both lines + if the previous call to xf86GetEntityInfo() + is effectivla the same */ + xfree(pEnt); pEnt = xf86GetEntityInfo(usedChips[i]); /* create a RADEONEntity for all chips, even with -- 1.5.2.3