Minor optimization in publisher sending message.

Don't malloc memory each time when publishing a message. As we don't pay
attention to the performance of message publisher.