i965: Fix memory leak when serializing nir
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 4 Nov 2017 00:18:32 +0000 (17:18 -0700)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 8 Dec 2017 05:59:25 +0000 (16:59 +1100)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/drivers/dri/i965/brw_program.c

index be839ab38a272f75a426160768c087195e96359e..6aa41009e744c7fc60f9bed66efae63dcc2ec6c2 100644 (file)
@@ -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