summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2013-12-18 14:40:49 -0600
committerAaron Watry <awatry@gmail.com>2014-01-16 10:10:04 -0600
commitce3528896b37c7d8ef051780e29ea9588fada9da (patch)
tree5339a8fdf7f8efcfe094ca505abd609e83b70b21
parent5ac3229f76f02453ae7e971d515b01fb56ad3fa5 (diff)
st/dri: prevent leak of dri option default values
v2: Change comment style CC: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.c6
1 files changed, 6 insertions, 0 deletions
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