malloc can fail. deal with it.