9ca7f5ce86
Add checks for malloc failure and add error exit in case of malloc failure. Add rcsid. Submitted by: charnier