summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kelly <davidk@talksum.com>2012-07-06 11:45:22 -0700
committerRainer Gerhards <rgerhards@adiscon.com>2012-07-31 08:40:43 +0200
commit91b7e5e34a27c6047fb871e9db77581181bd6f4a (patch)
treecfc7d5bfb94eacaf0b4e2d1c6c9e86c3893ebe86
parent9900fbe2e85f39b999f50d2ba4463d507f731f4c (diff)
downloadrsyslog-91b7e5e34a27c6047fb871e9db77581181bd6f4a.tar.gz
rsyslog-91b7e5e34a27c6047fb871e9db77581181bd6f4a.tar.xz
rsyslog-91b7e5e34a27c6047fb871e9db77581181bd6f4a.zip
BAT-40 Found leak in imzmq3 plugin
For some reason I forgot to free() the buffer that comes back from zstr_recv(). Doh!
-rw-r--r--plugins/imzmq3/imzmq3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/imzmq3/imzmq3.c b/plugins/imzmq3/imzmq3.c
index 78eee887..8107a1fc 100644
--- a/plugins/imzmq3/imzmq3.c
+++ b/plugins/imzmq3/imzmq3.c
@@ -491,7 +491,10 @@ static int handlePoll(zloop_t __attribute__((unused)) * loop, zmq_pollitem_t *po
logmsg->msgFlags = NEEDS_PARSING;
submitMsg(logmsg);
}
-
+
+ /* gotta free the string returned from zstr_recv() */
+ free(buf);
+
if( pollerData->thread->bShallStop == TRUE) {
/* a handler that returns -1 will terminate the
czmq reactor loop