diff options
-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 1f07c1c6c4..f542ee041f 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); } } |