st/dri: prevent leak of dri option default values
authorAaron Watry <awatry@gmail.com>
Wed, 18 Dec 2013 20:40:49 +0000 (14:40 -0600)
committerAaron Watry <awatry@gmail.com>
Thu, 16 Jan 2014 16:10:04 +0000 (10:10 -0600)
v2: Change comment style

CC: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/common/dri_screen.c

index 7410dbeba596ac4c5f5df9630d2c8cadd06b231a..b338f64b01be63bdea567bb4d3bc4d2d4db88690 100644 (file)
@@ -360,6 +360,12 @@ dri_destroy_option_cache(struct dri_screen * screen)
    }
 
    free(screen->optionCache.values);
+
+   /* Default values are copied to screen->optionCache->values in
+    * initOptionCache. The info field, however, is a pointer copy, so don't free
+    * that twice.
+    */
+   free(screen->optionCacheDefaults.values);
 }
 
 void