baseline.c: using memory_allocation_error more extensively

jumping straight forward to memory_allocation_error on
malloc's failures