Memory leak in function archive_read_open_filename_w
Memory leak in function archive_read_open_filename_w
.
A memory leak is reported by a static analyzer tool developed at CAST (https://www.linkedin.com/company/cast-center).
Specifically, dynamic memory is allocated in Utilities/cmlibarchive/libarchive/archive_read_open_filename.c:162 and is freed, or copied under custom conditions. If conditions until line 207 are not satisfied the memory leak will accure. As archive_read_append_callback_data function can return ARCHIVE_FATAL in several cases, the condition in line 205 can be unsatisfied. Allocated memory should be freed in those cases.