[Mesa-stable] [PATCH 2/3] st/dri: prevent leak of dri option default values
Aaron Watry
awatry at gmail.com
Fri Jan 10 16:45:51 PST 2014
v2: Change comment style
CC: "10.0" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/state_trackers/dri/common/dri_screen.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 7410dbe..b338f64 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
--
1.8.3.2
More information about the mesa-stable
mailing list