Linux/Qnx: MessageQ msg cannot be freed if put fails