Skip to content

Commit

Permalink
Remove null pointer checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Beanavil committed Dec 15, 2023
1 parent a8a6791 commit b3e7aff
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/src/Utils/File.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b3e7aff

Please sign in to comment.