diff options
author | Dave Airlie <[email protected]> | 2009-01-22 21:49:58 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-01-22 21:49:58 +1000 |
commit | 8b56a86385f3411f0d1ba64423f32bff6c60416d (patch) | |
tree | e6aaab85b7b1998e028c43e2d826734fa5d49d8b /src | |
parent | 860d0cc656ee0eb724b2d82596c09a9eee9a8d19 (diff) |
radeon: better free of array
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 7 |
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); } } |