Skip to content

Commit d3e898f

Browse files
haoxian2zibaiwan
authored andcommitted
Fixed coverity issues in acl_hal_mmd.cpp: Type: Resource leak (RESOURCE_LEAK)
1 parent 53a6913 commit d3e898f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/acl_hal_mmd.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ cl_bool l_load_board_libraries(cl_bool load_libraries) {
855855
}
856856
fin.close();
857857
}
858+
closedir(dir);
858859
}
859860

860861
if (num_vendor_files_found == 0) {
@@ -876,8 +877,6 @@ cl_bool l_load_board_libraries(cl_bool load_libraries) {
876877
}
877878
}
878879

879-
if (dir)
880-
closedir(dir);
881880
return num_boards_found == 0 ? CL_FALSE : CL_TRUE;
882881
}
883882
#endif

0 commit comments

Comments
 (0)