[Mesa-dev] [PATCH v2 08/17] i965: Fix memory leak when serializing nir

Jordan Justen jordan.l.justen at intel.com
Mon Nov 20 22:27:34 UTC 2017


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
 src/mesa/drivers/dri/i965/brw_program.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index c8513c947da..8d321656fef 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -797,6 +797,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
-- 
2.14.1



More information about the mesa-dev mailing list