diff options
Diffstat (limited to 'src/core/msgqueue.c')
| -rw-r--r-- | src/core/msgqueue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/msgqueue.c b/src/core/msgqueue.c index 62f57553..e58fe6f5 100644 --- a/src/core/msgqueue.c +++ b/src/core/msgqueue.c @@ -57,7 +57,7 @@ nni_msgq_init(nni_msgq **mqp, unsigned cap) if ((mq = NNI_ALLOC_STRUCT(mq)) == NULL) { return (NNG_ENOMEM); } - if ((mq->mq_msgs = nni_alloc(sizeof(nng_msg *) * alloc)) == NULL) { + if ((mq->mq_msgs = nni_zalloc(sizeof(nng_msg *) * alloc)) == NULL) { NNI_FREE_STRUCT(mq); return (NNG_ENOMEM); } @@ -496,7 +496,7 @@ nni_msgq_resize(nni_msgq *mq, int cap) alloc = cap + 2; if (alloc > mq->mq_alloc) { - newq = nni_alloc(sizeof(nni_msg *) * alloc); + newq = nni_zalloc(sizeof(nni_msg *) * alloc); if (newq == NULL) { return (NNG_ENOMEM); } |
