diff options
author | Dave Airlie <airlied@linux.ie> | 2009-01-22 21:38:35 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-01-22 21:38:35 +1000 |
commit | 02952a41eb0e47ab77a984922c1c3202aeb45b50 (patch) | |
tree | 3a5c206e20c0f7422f530a0364ebc4242cdff14d /src | |
parent | 2c8b55b351c84cda4e620a5aba3e67c110890567 (diff) |
radeon: check relocs before deref
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 5 |
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 f09031e83b..b975124828 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) |