st/dri: Fix a memory leak in dri1_init_screen.
authorChia-I Wu <olv@lunarg.com>
Tue, 30 Mar 2010 07:41:31 +0000 (15:41 +0800)
committerChia-I Wu <olv@lunarg.com>
Tue, 30 Mar 2010 07:41:50 +0000 (15:41 +0800)
Free the returned configs upon errors.

src/gallium/state_trackers/dri/drm/dri1.c

index 9b5842ba2bf3d2e28d9fcc42e4c2eb39355a2c9f..cca7cd8f0c3805bbbaa973a78f2a95acf91cad1c 100644 (file)
@@ -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;