summaryrefslogtreecommitdiff
path: root/src/riva_driver.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2006-03-10 02:29:03 +0000
committerAaron Plattner <aplattner@nvidia.com>2006-03-10 02:29:03 +0000
commit84c007b426d321786f9aec1d9fda14b5baa35561 (patch)
treed080632b5260403112b6706f3998ff4ca556f104 /src/riva_driver.c
parent61e237eec7193701ce1236e67ebdfe7465b5db8a (diff)
Coverity nos. 868 and 869: Free the result of xf86GetEntityInfo.
Diffstat (limited to 'src/riva_driver.c')
-rw-r--r--src/riva_driver.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/riva_driver.c b/src/riva_driver.c
index 968ef47..c5e6ea0 100644
--- a/src/riva_driver.c
+++ b/src/riva_driver.c
@@ -493,8 +493,16 @@ RivaPreInit(ScrnInfoPtr pScrn, int flags)
const char *s;
if (flags & PROBE_DETECT) {
- rivaProbeDDC( pScrn, xf86GetEntityInfo(pScrn->entityList[0])->index );
- return TRUE;
+ EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
+
+ if (!pEnt)
+ return FALSE;
+
+ i = pEnt->index;
+ xfree(pEnt);
+
+ rivaProbeDDC(pScrn, i);
+ return TRUE;
}
/*