From ce3528896b37c7d8ef051780e29ea9588fada9da Mon Sep 17 00:00:00 2001 From: Aaron Watry Date: Wed, 18 Dec 2013 14:40:49 -0600 Subject: st/dri: prevent leak of dri option default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2: Change comment style CC: "10.0" Reviewed-by: Marek Olšák --- src/gallium/state_trackers/dri/common/dri_screen.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/state_trackers/dri') 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 -- cgit v1.2.3