libCom: fix possible memory leak in RTEMS-posix/osdMessageQueue.c
found by static code analysis (cppcheck @ sonarqube)
This commit is contained in:
committed by
Michael Davidsaver
parent
38c99df2e0
commit
b51d1de283
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user