diff options
author | David Kelly <davidk@talksum.com> | 2012-07-06 11:45:22 -0700 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-07-31 08:40:43 +0200 |
commit | 91b7e5e34a27c6047fb871e9db77581181bd6f4a (patch) | |
tree | cfc7d5bfb94eacaf0b4e2d1c6c9e86c3893ebe86 | |
parent | 9900fbe2e85f39b999f50d2ba4463d507f731f4c (diff) | |
download | rsyslog-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.c | 5 |
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 |