GH235: Set error status on malloc failure