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

free should check for null pointers #1

Open
uxmal opened this issue Mar 18, 2019 · 0 comments
Open

free should check for null pointers #1

uxmal opened this issue Mar 18, 2019 · 0 comments

Comments

@uxmal
Copy link

uxmal commented Mar 18, 2019

cpts/std.c

Line 1479 in c152452

bp = (header *)ap - 1;

It's legal to pass NULL to free:
https://stackoverflow.com/questions/6084218/is-it-good-practice-to-free-a-null-pointer-in-c

Suggest adding a NULL check and returning early from free.

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

No branches or pull requests

1 participant