From 5c0f6268d00edde5d9fb4728e3efd92499159d1b Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 11 Apr 2019 22:01:42 -0700 Subject: fixes #915 Memory Leak in pub --- src/protocol/pubsub0/pub.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/protocol') diff --git a/src/protocol/pubsub0/pub.c b/src/protocol/pubsub0/pub.c index bec0763f..c4a164e7 100644 --- a/src/protocol/pubsub0/pub.c +++ b/src/protocol/pubsub0/pub.c @@ -285,6 +285,9 @@ pub0_sock_send(void *arg, nni_aio *aio) } } nni_mtx_unlock(&sock->mtx); + if (msg != NULL) { + nng_msg_free(msg); + } nni_aio_finish(aio, 0, len); } -- cgit v1.2.3-70-g09d2