aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-01-22 21:38:35 +1000
committerDave Airlie <[email protected]>2009-01-22 21:38:35 +1000
commit02952a41eb0e47ab77a984922c1c3202aeb45b50 (patch)
tree3a5c206e20c0f7422f530a0364ebc4242cdff14d /src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
parent2c8b55b351c84cda4e620a5aba3e67c110890567 (diff)
radeon: check relocs before deref
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_cs_legacy.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_cs_legacy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
index f09031e83bb..b9751248280 100644
--- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
@@ -337,8 +337,9 @@ static int cs_emit(struct radeon_cs *cs)
static void inline cs_free_reloc(void *relocs_p)
{
- struct cs_reloc_legacy *relocs = relocs_p;
- free(relocs->indices);
+ struct cs_reloc_legacy *relocs = relocs_p;
+ if (relocs)
+ free(relocs->indices);
}
static int cs_destroy(struct radeon_cs *cs)