[syslog-ng] [Bug 278] Many memory leak problems happen when do configuration reloading

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Thu May 15 07:22:12 CEST 2014


https://bugzilla.balabit.com/show_bug.cgi?id=278





--- Comment #14 from Xufeng Zhang <xufeng.zhang at windriver.com>  2014-05-15 07:22:11 ---
For the above 3) case, I think there is a memory leak problem in
modules/affile/logproto-file-writer.c:
Take the following scenario, we call log_proto_file_writer_post()
to post a message, if we have consumed the previous data and after register
the new message, consumed variable will be TRUE, this indicates we will allocate
a new self->line_buffer->str buffer in log_writer_flush() after we return from
log_proto_file_writer_post(), but there are cases that the new message has not been
copied to the partial buffer and freed in log_proto_file_writer_flush(), one case is
log_proto_file_writer_flush() return LPS_ERROR when I/O error happened, I think this
is the reason why my previous patch "Don't allocate a new buffer if fails to consume current item"
partially works.
How would we handle this situation?


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list