Hi,
I checked the _msg_alloc function implementation (C:\Freescale\Freescale MQX 3.8\mqx\source\message\ms_alloc.c) and it does not set this error anywhere in code.
Can you check if the task error is not set already before calling _msg_alloc? The mentioned error is set only by _msgq_open_system, _msgq_peek, _msgq_poll and _msgq_recieve_xxx functions as described in MQX Reference manual.
Regards,
PetrL