[coverity] 1543224 Dereference after null check

This commit is contained in:
akallabeth 2024-04-12 09:01:12 +02:00 committed by akallabeth
parent 0304897f7b
commit 158d26aa91

View File

@ -15,6 +15,7 @@ static char* resize(char** buffer, size_t* size, size_t increment)
fprintf(stderr, "Could not reallocate string buffer from %" PRIuz " to %" PRIuz " bytes.\n",
*size, nsize);
free(*buffer);
return NULL;
}
memset(&tmp[*size], '\0', increment);
*size = nsize;