Test error test for safeMalloc