projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a17750b
)
radeon: Fix memory leak in radeonCreateScreen2.
author
Vinson Lee
<vlee@freedesktop.org>
Fri, 30 Nov 2012 07:10:03 +0000
(23:10 -0800)
committer
Vinson Lee
<vlee@freedesktop.org>
Sat, 1 Dec 2012 03:34:31 +0000
(19:34 -0800)
Fixes a memory leak defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/radeon/radeon_screen.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/radeon/radeon_screen.c
b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 6f4750a02fff048b24e3cda709817591182efb40..2e6cf3cb5c08e8a7dc0e6aa9f3031088f73c3de3 100644
(file)
--- 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;