From b3e7aff7e00056508c1051750acb5bc773292f68 Mon Sep 17 00:00:00 2001 From: Beatriz Navidad Vilches Date: Fri, 15 Dec 2023 12:16:16 +0000 Subject: [PATCH] Remove null pointer checks --- lib/src/Utils/File.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/src/Utils/File.c b/lib/src/Utils/File.c index f4c47452..46b6db91 100644 --- a/lib/src/Utils/File.c +++ b/lib/src/Utils/File.c @@ -263,10 +263,7 @@ cl_int cl_util_write_binaries(const cl_program program, for (cl_uint i = 0; i < num_devices; ++i) free(binaries_ptr[i]); free(binaries_ptr); } - if(binaries_size != NULL) - { - free(binaries_size); - } + free(binaries_size); return error; } @@ -335,10 +332,7 @@ cl_program cl_util_read_binaries(const cl_context context, for (cl_uint i = 0; i < num_devices; ++i) free(binaries_ptr[i]); free(binaries_ptr); } - if(binaries_size != NULL) - { - free(binaries_size); - } + free(binaries_size); if (error != NULL) *error = err; return program;