[Mesa-dev] [PATCH 2/4] st/dri: prevent leak of dri option default values

Marek Olšák maraeo at gmail.com
Fri Jan 3 05:19:46 PST 2014


Please don't use the "//" comments in C files. Other than that, the series is:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Thu, Jan 2, 2014 at 7:38 PM, Aaron Watry <awatry at gmail.com> wrote:
> CC: "10.0" <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/state_trackers/dri/common/dri_screen.c | 4 ++++
>  1 file changed, 4 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..a657249 100644
> --- a/src/gallium/state_trackers/dri/common/dri_screen.c
> +++ b/src/gallium/state_trackers/dri/common/dri_screen.c
> @@ -360,6 +360,10 @@ 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list