From: Dave Airlie Date: Thu, 22 Jan 2009 22:08:34 +0000 (+1000) Subject: radeon: plug memory leak running gears X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d93dc4338279c03b8fa2b0adec01dedae4fe4895;p=mesa.git radeon: plug memory leak running gears --- 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)