From 55a4ac74a3daa1605549a9408c4b0bb9ebce8aee Mon Sep 17 00:00:00 2001 From: "Yang, Hao Xiang" Date: Fri, 9 Dec 2022 10:36:15 -0800 Subject: [PATCH] Fixed coverity in acl_program.cpp: Dereference before null check (REVERSE_INULL) --- src/acl_program.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/acl_program.cpp b/src/acl_program.cpp index 26e57b87..fb5f03dd 100644 --- a/src/acl_program.cpp +++ b/src/acl_program.cpp @@ -142,8 +142,7 @@ CL_API_ENTRY cl_int CL_API_CALL clReleaseProgramIntelFPGA(cl_program program) { if (program->device[i]->last_bin != nullptr) program->device[i]->last_bin->unload_content(); } - if (program) - l_free_program(program); + l_free_program(program); } return CL_SUCCESS; }