diff options
author | Dave Airlie <[email protected]> | 2009-01-22 21:38:35 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-01-22 21:38:35 +1000 |
commit | 02952a41eb0e47ab77a984922c1c3202aeb45b50 (patch) | |
tree | 3a5c206e20c0f7422f530a0364ebc4242cdff14d /src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | |
parent | 2c8b55b351c84cda4e620a5aba3e67c110890567 (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.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 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) |