diff options
Diffstat (limited to 'newlib/libc/sys/linux/mq_open.c')
-rw-r--r-- | newlib/libc/sys/linux/mq_open.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/sys/linux/mq_open.c b/newlib/libc/sys/linux/mq_open.c index 744cb9eaa..0e6b95345 100644 --- a/newlib/libc/sys/linux/mq_open.c +++ b/newlib/libc/sys/linux/mq_open.c @@ -210,7 +210,11 @@ mq_open (const char *name, int oflag, ...) } } else /* just open it */ - msgqid = msgget (key, 0); + { + msgqid = msgget (key, 0); + wrbuf = (MSG *)malloc (attr->mq_msgsize + sizeof(int)); + rdbuf = (MSG *)malloc (attr->mq_msgsize + sizeof(int)); + } /* release semaphore acquired earlier */ sb.sem_op = 1; |