aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-01-23 08:08:34 +1000
committerDave Airlie <[email protected]>2009-01-23 08:08:34 +1000
commitd93dc4338279c03b8fa2b0adec01dedae4fe4895 (patch)
tree66050455f3e8a45fb0282545060f1cc9467da2a8 /src/mesa/drivers/dri/radeon
parent9780127449c6b32cc16ee1a1589c1e28eae1d7bb (diff)
radeon: plug memory leak running gears
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_legacy.c5
1 files 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)