libCom: fix possible memory leak in RTEMS-posix/osdMessageQueue.c

found by static code analysis (cppcheck @ sonarqube)
This commit is contained in:
Ralph Lange
2023-05-26 09:23:54 +02:00
committed by Michael Davidsaver
parent 38c99df2e0
commit b51d1de283

View File

@@ -47,6 +47,7 @@ epicsMessageQueueCreate(unsigned int capacity, unsigned int maximumMessageSize)
id->id = mq_open(id->name, O_RDWR | O_CREAT | O_EXCL, 0644, &the_attr);
if (id->id <0) {
fprintf (stderr, "Can't create message queue: %s\n", strerror (errno));
free(id);
return NULL;
}
return id;