From 8b56a86385f3411f0d1ba64423f32bff6c60416d Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 22 Jan 2009 21:49:58 +1000 Subject: [PATCH] radeon: better free of array --- src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 7 +++---- 1 file 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); } } -- 2.30.2