summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-11-03 16:45:46 -0700
committerTimothy Arceri <[email protected]>2017-12-08 16:44:35 +1100
commitb3f1b765e964f2d4b6be38e7fbbe78b817aec100 (patch)
tree22f1498b9db47a725777944f98234b5b8e238b5b
parentcdc7ac23b9ada9133fbacb28cf3b52dcadc51fac (diff)
i965: Free serialized nir after deserializing
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
-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 2a647cdd734..30cc14e88a2 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;
+ }
}