You're illegally (not from a compiler standpoint) casting the MessageQ_Msg returned from MessageQ_alloc to a pointer to a MessageQ_Msg. Since the return type of MessageQ_alloc is a MessageQ_Msg your eventual call to MessageQ_put with the "invalid" derefence of the MessageQ_Msg will cause a failure. The dereference of something that was not meant to be derefenced in the first place will cause MessageQ to validate the provided MessageQ_Msg against the wrong data in memory.
If you look at the MessageQ APIs you'll see that MessageQ_Msg is actually a typedef'd pointer to a MessageQ_MsgHeader. Therefore, your "p" structure need only have an element of type MessageQ_Msg, not MessageQ_Msg *.
Justin