aboutsummaryrefslogtreecommitdiff
path: root/src/zmq
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2017-03-22 12:56:44 -0700
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2017-03-22 12:56:44 -0700
commit5ba61f0034597ffeedc8c44af5a6ec670b095d83 (patch)
treec34eddb9c3b3a2702ef75449c1373cd1f1879cf1 /src/zmq
parent02d64bd929c9663ba38e96721c6dbd89972d043d (diff)
[zmq] Call va_end() on va_start()ed args.
Diffstat (limited to 'src/zmq')
-rw-r--r--src/zmq/zmqpublishnotifier.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp
index caca1248a1..4e13cbcaf4 100644
--- a/src/zmq/zmqpublishnotifier.cpp
+++ b/src/zmq/zmqpublishnotifier.cpp
@@ -30,6 +30,7 @@ static int zmq_send_multipart(void *sock, const void* data, size_t size, ...)
if (rc != 0)
{
zmqError("Unable to initialize ZMQ msg");
+ va_end(args);
return -1;
}
@@ -43,6 +44,7 @@ static int zmq_send_multipart(void *sock, const void* data, size_t size, ...)
{
zmqError("Unable to send ZMQ msg");
zmq_msg_close(&msg);
+ va_end(args);
return -1;
}
@@ -53,6 +55,7 @@ static int zmq_send_multipart(void *sock, const void* data, size_t size, ...)
size = va_arg(args, size_t);
}
+ va_end(args);
return 0;
}