aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-27 10:34:13 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-27 10:34:18 +0200
commite6156a0aa329c2a94a4b4f1d81b6125ec8cf52ae (patch)
tree0475534a84938ec6621ad7cf532bec128b3c6de5
parent0ddea4430d62bd06162ebf5404018416405b1c52 (diff)
parent5ba61f0034597ffeedc8c44af5a6ec670b095d83 (diff)
Merge #10056: [zmq] Call va_end() on va_start()ed args.
5ba61f0 [zmq] Call va_end() on va_start()ed args. (Karl-Johan Alm) Tree-SHA512: fbd3a0c29308ca9607f362f14fa7ea9c949a3f25dc09a349fe3b3ffd316b573c86778e29d3b9d55c684571eacae50aca90bb872e2e5489818d0af8310511fe79
-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;
}