Skip to content

Check for a NULL from malloc. #792

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

Merged
merged 6 commits into from
Dec 26, 2017
Merged

Check for a NULL from malloc. #792

merged 6 commits into from
Dec 26, 2017

Conversation

ddpbsd
Copy link
Member

@ddpbsd ddpbsd commented Apr 1, 2016

I'm not sure if returning 0 is the best option here, just copied it from issue #752

@ddpbsd
Copy link
Member Author

ddpbsd commented Apr 1, 2016

I think I got the return right in c63b476, but I'm not totally positive.

@dcid
Copy link

dcid commented Apr 11, 2016

I always like to add some logging on memory failures, but tricky to do on some cases. Seems ok here.

It might be better long term to have a saved buffer we can release on memory failure error, just so we can log things properly before exiting. Unrelated to this :)

@ddpbsd
Copy link
Member Author

ddpbsd commented Apr 11, 2016

I can add some merrors to the failures, that shouldn't be too hard.

@ddpbsd
Copy link
Member Author

ddpbsd commented Apr 22, 2016

I added some merrors, although I didn't do anything to help specify which one was erroring out. Not sure if it matters at that point?

@ddpbsd ddpbsd merged commit b4347c9 into ossec:master Dec 26, 2017
@ddpbsd ddpbsd deleted the issue752 branch December 26, 2017 15:41
@PSanchezR PSanchezR mentioned this pull request Jan 5, 2018
6 tasks
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