From: Jordan Justen Date: Sat, 4 Nov 2017 00:18:32 +0000 (-0700) Subject: i965: Fix memory leak when serializing nir X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e28494af2cbeb555856e984a1ff5ef2ac96411c;p=mesa.git i965: Fix memory leak when serializing nir Signed-off-by: Jordan Justen Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index be839ab38a2..6aa41009e74 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -796,6 +796,7 @@ brw_program_serialize_nir(struct gl_context *ctx, struct gl_program *prog) prog->driver_cache_blob = ralloc_size(NULL, writer.size); memcpy(prog->driver_cache_blob, writer.data, writer.size); prog->driver_cache_blob_size = writer.size; + blob_finish(&writer); } void