From 91b7e5e34a27c6047fb871e9db77581181bd6f4a Mon Sep 17 00:00:00 2001 From: David Kelly Date: Fri, 6 Jul 2012 11:45:22 -0700 Subject: BAT-40 Found leak in imzmq3 plugin For some reason I forgot to free() the buffer that comes back from zstr_recv(). Doh! --- plugins/imzmq3/imzmq3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/imzmq3/imzmq3.c') 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 -- cgit