[syslog-ng] Memory leak can occur with supressed duplicate log messages

andy kitchingman andy.kitchingman at alliedtelesis.co.nz
Mon Jun 28 02:30:03 CEST 2010


Hi  

Due to my company firewall, I do not have access to the git public repository, so I will post this here. 

I believe there is a memory leak when duplicate messages are suppressed and messages cannot be consumed: 

logwriter.c: log_writer_last_msg_flush(LogWriter *self) 
------------------------------------------- 

log_queue_push_tail(self->queue, m, &path_options) can return FALSE (message cannot be consumed), in which case the local LogMessage m is leaked. 

The fix should be something like 

  if (!log_queue_push_tail(self->queue, m, &path_options)) 
    { 
      log_msg_unref(m); 
    } 

Regards 

Andy Kitchingman 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20100628/cf533b14/attachment.htm 


More information about the syslog-ng mailing list