<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 2, 2017 at 8:31 PM, Bartosz Tomczyk <span dir="ltr"><<a href="mailto:bartosz.tomczyk86@gmail.com" target="_blank">bartosz.tomczyk86@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
src/compiler/glsl/shader_<wbr>cache.cpp | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/compiler/glsl/shader_<wbr>cache.cpp b/src/compiler/glsl/shader_<wbr>cache.cpp<br>
index ea1bc01f02..8c42a95664 100644<br>
--- a/src/compiler/glsl/shader_<wbr>cache.cpp<br>
+++ b/src/compiler/glsl/shader_<wbr>cache.cpp<br>
@@ -1273,6 +1273,8 @@ shader_cache_write_program_<wbr>metadata(struct gl_context *ctx,<br>
<br>
disk_cache_put(cache, prog->data->sha1, metadata->data, metadata->size);<br>
<br>
+ if(metadata->data)<br>
+ free(metadata->data);<br></blockquote><div><br></div><div>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:<br></div>Reviewed-by: Grazvydas Ignotas <<a href="mailto:notasas@gmail.com">notasas@gmail.com</a>><br></div><div class="gmail_quote">for both patches.<br><br></div><br></div></div>