summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-01-22 21:49:58 +1000
committerDave Airlie <[email protected]>2009-01-22 21:49:58 +1000
commit8b56a86385f3411f0d1ba64423f32bff6c60416d (patch)
treee6aaab85b7b1998e028c43e2d826734fa5d49d8b /src/mesa/drivers
parent860d0cc656ee0eb724b2d82596c09a9eee9a8d19 (diff)
radeon: better free of array
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_legacy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
index 1f07c1c6c4f..f542ee041f8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
@@ -339,11 +339,10 @@ static void inline cs_free_reloc(void *relocs_p, int crelocs)
{
struct cs_reloc_legacy *relocs = relocs_p;
int i;
-
+ if (relocs_p)
+ return;
for (i = 0; i < crelocs; i++) {
- struct cs_reloc_legacy *ptr = relocs[i];
- if (ptr)
- free(ptr->indices);
+ free(relocs[i].indices);
}
}