[coverity] 1543224 Dereference after null check
This commit is contained in:
parent
0304897f7b
commit
158d26aa91
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user