summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2013-12-18 14:40:49 -0600
committerCarl Worth <cworth@cworth.org>2014-01-25 16:44:23 -0800
commitb6464413074931968c78806afa9423ba9d80b8d9 (patch)
tree1ed7f8d06664f971f60ad029e5d918cdc85cbfc1
parent0ec1ae90ef78cbae2d964250996ac8f59adf58c1 (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> (cherry picked from commit ce3528896b37c7d8ef051780e29ea9588fada9da)
-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