diff options
author | Vinson Lee <[email protected]> | 2012-11-29 23:10:03 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2012-11-30 19:34:31 -0800 |
commit | da7029dcb498f80d1837323038617b49cc28431f (patch) | |
tree | dbf7e55c3c3a0c17acb844a31ccf856daf018b5d /src/mesa | |
parent | a17750b6884939a36947c76a30d3077f1488f943 (diff) |
radeon: Fix memory leak in radeonCreateScreen2.
Fixes a memory leak defect reported by Coverity.
Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 6f4750a02ff..2e6cf3cb5c0 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -510,8 +510,10 @@ radeonCreateScreen2(__DRIscreen *sPriv) } ret = radeon_set_screen_flags(screen, device_id); - if (ret == -1) + if (ret == -1) { + free(screen); return NULL; + } if (getenv("RADEON_NO_TCL")) screen->chip_flags &= ~RADEON_CHIPSET_TCL; |