[Beignet] [PATCH V2 5/5] Runtime: Fix memleak in build program for bin
Xiuli Pan
xiuli.pan at intel.com
Tue May 17 08:55:44 UTC 2016
From: Pan Xiuli <xiuli.pan at intel.com>
V2: Remove repeat setting.
Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
src/cl_program.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cl_program.c b/src/cl_program.c
index b4656ce..e079a77 100644
--- a/src/cl_program.c
+++ b/src/cl_program.c
@@ -601,7 +601,7 @@ cl_program_build(cl_program p, const char *options)
}
/* Create all the kernels */
TRY (cl_program_load_gen_program, p);
- } else if (p->source_type == FROM_BINARY) {
+ } else if (p->source_type == FROM_BINARY && p->binary_type != CL_PROGRAM_BINARY_TYPE_EXECUTABLE) {
p->opaque = interp_program_new_from_binary(p->ctx->device->device_id, p->binary, p->binary_sz);
if (UNLIKELY(p->opaque == NULL)) {
err = CL_BUILD_PROGRAM_FAILURE;
--
2.5.0
More information about the Beignet
mailing list