We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As mentioned in #727 (comment), the following code will leak the original memory block in case of realloc failure:
realloc
seq->buf = realloc(seq->buf, (size_t)(cap * size)); if (seq->buf == NULL) { seq->cap = 0; celix_err_pushf("Error allocating memory for seq buf"); return MEM_ERROR; }
According to the manual page:
If realloc() fails, the original block is left untouched; it is not freed or moved.
The text was updated successfully, but these errors were encountered:
gh-730: Fix leaks caused by realloc failure.
d729e7a
PengZheng
Successfully merging a pull request may close this issue.
As mentioned in #727 (comment), the following code will leak the original memory block in case of
realloc
failure:According to the manual page:
The text was updated successfully, but these errors were encountered: