On Sun, Apr 2, 2017 at 8:31 PM, Bartosz Tomczyk <bartosz.tomczy...@gmail.com
> wrote:

> ---
>  src/compiler/glsl/shader_cache.cpp | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/compiler/glsl/shader_cache.cpp
> b/src/compiler/glsl/shader_cache.cpp
> index ea1bc01f02..8c42a95664 100644
> --- a/src/compiler/glsl/shader_cache.cpp
> +++ b/src/compiler/glsl/shader_cache.cpp
> @@ -1273,6 +1273,8 @@ shader_cache_write_program_metadata(struct
> gl_context *ctx,
>
>     disk_cache_put(cache, prog->data->sha1, metadata->data,
> metadata->size);
>
> +   if(metadata->data)
> +      free(metadata->data);
>

Please add a space after 'if' to match the style of all other code or drop
the NULL check altogether as free(NULL) is fine. With that:
Reviewed-by: Grazvydas Ignotas <nota...@gmail.com>
for both patches.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to