Yes memory allocation failures should be handled, at least be reported, and of course not leaking or crashing. However it's really hard to
perfectly
handle out of memory failures. We really need to fix leaks or crashes and report the error though the API, anything beyond that is nice but less critical. If the application >
chose to ignore the memory error, nothing can be done to save it anyway. Hi, I am attaching a patch for some memory leak fixes in malloc failure scenarios, also adding checks where malloc return is not checked for NULL(parser.c). Please let me know if the changes are ok. Regards Ashwin
Attachment:
parser.txt
Description: Text document