From d93dc4338279c03b8fa2b0adec01dedae4fe4895 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 23 Jan 2009 08:08:34 +1000 Subject: [PATCH] radeon: plug memory leak running gears --- src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c index 714d2628124..a95d27c05e6 100644 --- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c @@ -337,11 +337,10 @@ static void inline cs_free_reloc(void *relocs_p, int crelocs) { struct cs_reloc_legacy *relocs = relocs_p; int i; - if (relocs_p) + if (!relocs_p) return; - for (i = 0; i < crelocs; i++) { + for (i = 0; i < crelocs; i++) free(relocs[i].indices); - } } static int cs_destroy(struct radeon_cs *cs) -- 2.30.2