summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2017-11-03 16:45:46 -0700
committerJordan Justen <jordan.l.justen@intel.com>2017-11-20 13:07:10 -0800
commit1fecedc3fa9b9cb7c4c7ac61e7a21f2a75242e15 (patch)
treec812a80d4946e49444873933c306480ec4987342
parent84c8181a6969d42c34b43db6e29248ec222cc5f0 (diff)
i965: Free serialized nir after deserializing
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 2a647cdd73..30cc14e88a 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -800,4 +800,10 @@ brw_program_deserialize_nir(struct gl_context *ctx, struct gl_program *prog,
prog->driver_cache_blob_size);
prog->nir = nir_deserialize(NULL, options, &reader);
}
+
+ if (prog->driver_cache_blob) {
+ ralloc_free(prog->driver_cache_blob);
+ prog->driver_cache_blob = NULL;
+ prog->driver_cache_blob_size = 0;
+ }
}