Add checks for memory allocation failures

Signed-off-by: Mahavir Jain <[email protected]>
2 files changed