<div dir="ltr">On Sun, Apr 2, 2017 at 11:31 AM, Bartosz Tomczyk <span dir="ltr"><<a href="mailto:bartosz.tomczyk86@gmail.com" target="_blank">bartosz.tomczyk86@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
src/mesa/state_tracker/st_<wbr>shader_cache.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/mesa/state_tracker/st_<wbr>shader_cache.c b/src/mesa/state_tracker/st_<wbr>shader_cache.c<br>
index e8c7289ec6..5dbcb74f73 100644<br>
--- a/src/mesa/state_tracker/st_<wbr>shader_cache.c<br>
+++ b/src/mesa/state_tracker/st_<wbr>shader_cache.c<br>
@@ -135,6 +135,8 @@ st_store_tgsi_in_disk_cache(<wbr>struct st_context *st, struct gl_program *prog,<br>
_mesa_shader_stage_to_string(<wbr>prog->info.stage), sha1_buf);<br>
}<br>
<br>
+ if(blob->data)<br>
+ free(blob->data);<br>
</blockquote><div><br></div><div>free() should accept NULL, so the conditional shouldn't be needed.<br><br></div><div>-Brian<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> free(blob);<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.12.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>