Coverity-401434: Switch to realloc that does not free after failure

Because we free after the done-label.
This commit is contained in:
Micah Snyder 2023-04-07 10:43:09 -07:00 committed by Micah Snyder
parent dc8b3e78c7
commit d24c6f7569

View file

@ -1061,7 +1061,7 @@ cl_error_t index_the_central_directory(
goto done;
}
zip_catalogue_new = cli_realloc2(zip_catalogue, sizeof(struct zip_record) * ZIP_RECORDS_CHECK_BLOCKSIZE * (num_record_blocks + 1));
zip_catalogue_new = cli_realloc(zip_catalogue, sizeof(struct zip_record) * ZIP_RECORDS_CHECK_BLOCKSIZE * (num_record_blocks + 1));
if (NULL == zip_catalogue_new) {
status = CL_EMEM;
goto done;