cobalt/posix/mqueue: Fix crash after failing registration
If xnregistry_enter in mq_open fails, the new entry will not be added to
cobalt_mqq. But the cleanup path taken afterwards will nevertheless try
to remove it from there. That will cause a crash because the mq->link is
uninitialized. Fix that by initializing it as list head so that list
removal becomes harmless, even when the entry is not on any list..
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
Showing
Please register or sign in to comment