Catch {c,m}alloc errors by aborting

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>