summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-03-30 15:41:31 +0800
committerChia-I Wu <[email protected]>2010-03-30 15:41:50 +0800
commitaa1a79036003c2aeaae24877da66e9b46a059cad (patch)
treedeb3c7de47f328ec003bee68cf7f9dedbeff90ab /src/gallium/state_trackers/dri
parentf6f5cba9a66afea3f500e3be1c15e7b18d88e265 (diff)
st/dri: Fix a memory leak in dri1_init_screen.
Free the returned configs upon errors.
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri1.c b/src/gallium/state_trackers/dri/drm/dri1.c
index 9b5842ba2bf..cca7cd8f0c3 100644
--- a/src/gallium/state_trackers/dri/drm/dri1.c
+++ b/src/gallium/state_trackers/dri/drm/dri1.c
@@ -514,6 +514,8 @@ dri1_init_screen(__DRIscreen * sPriv)
return configs;
fail:
+ if (configs)
+ FREE(configs);
dri_destroy_screen_helper(screen);
FREE(screen);
return NULL;