Skip to content
New issue

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

Fix null pointer dereference on failed memory reallocation #39

Merged

Conversation

adams85
Copy link

@adams85 adams85 commented Nov 26, 2024

This PR fixes a minor bug in sdssplitargs.

When the reallocation of vector fails, free should be called on the original pointer when cleaning up. The current implementation may lead to dereferencing a null pointer.

@adams85 adams85 changed the title Fix memory leak on failed memory reallocation Fix null pointer dereference on failed memory reallocation Nov 26, 2024
@jcorporation jcorporation merged commit 9d55dec into jcorporation:master Nov 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants