mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-28 21:57:26 +00:00
When udp connection is used, there are several memory leaks happen after run a long time. Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
27 lines
774 B
Diff
27 lines
774 B
Diff
logwriter: Don't allocate a new buffer if fails to consume current item
|
|
|
|
Upstream-Status: Pending
|
|
|
|
Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
|
|
---
|
|
--- a/lib/logwriter.c
|
|
+++ b/lib/logwriter.c
|
|
@@ -1010,7 +1010,7 @@
|
|
{
|
|
status = log_proto_client_post(proto, (guchar *) self->line_buffer->str, self->line_buffer->len, &consumed);
|
|
|
|
- if (consumed)
|
|
+ if (consumed && status != LPS_ERROR)
|
|
log_writer_realloc_line_buffer(self);
|
|
|
|
if (status == LPS_ERROR)
|
|
@@ -1028,7 +1028,7 @@
|
|
NULL);
|
|
consumed = TRUE;
|
|
}
|
|
- if (consumed)
|
|
+ if (consumed && status != LPS_ERROR)
|
|
{
|
|
if (lm->flags & LF_LOCAL)
|
|
step_sequence_number(&self->seq_num);
|