From: Aaron Watry Date: Wed, 18 Dec 2013 20:40:49 +0000 (-0600) Subject: st/dri: prevent leak of dri option default values X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce3528896b37c7d8ef051780e29ea9588fada9da;p=mesa.git st/dri: prevent leak of dri option default values v2: Change comment style CC: "10.0" Reviewed-by: Marek Olšák --- diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 7410dbeba59..b338f64b01b 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -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