From b239d99a2c680e208e36f44546a85ca9b020ad3e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 20 Aug 2017 11:54:49 +0100 Subject: [PATCH] Problem: test_security_gssapi does not close messages Solution: do it to avoid leaks. Even though they are below 33 bytes so it's all allocated on the stack, the small message size might change in the future. --- tests/test_security_gssapi.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_security_gssapi.cpp b/tests/test_security_gssapi.cpp index b41109dd..b2a47620 100644 --- a/tests/test_security_gssapi.cpp +++ b/tests/test_security_gssapi.cpp @@ -74,6 +74,7 @@ get_monitor_event (void *monitor, int *value, char **address) uint16_t event = *(uint16_t *) (data); if (value) *value = *(uint32_t *) (data + 2); + zmq_msg_close (&msg); // Second frame in message contains event address zmq_msg_init (&msg); @@ -88,6 +89,8 @@ get_monitor_event (void *monitor, int *value, char **address) memcpy (*address, data, size); *address [size] = 0; } + zmq_msg_close (&msg); + return event; } #endif