Skip to content

Comments

Check for a NULL from malloc.#792

Merged
ddpbsd merged 6 commits intoossec:masterfrom
ddpbsd:issue752
Dec 26, 2017
Merged

Check for a NULL from malloc.#792
ddpbsd merged 6 commits intoossec:masterfrom
ddpbsd:issue752

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