[syslog-ng] [Bug 280] Memory leak in value-pairs.c

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Sun May 18 22:46:03 CEST 2014


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





--- Comment #1 from Balazs Scheidler <bazsi at balabit.hu>  2014-05-18 22:46:02 ---
Hi,

can you check if this patch fixes it for you?

diff --git a/lib/value-pairs.c b/lib/value-pairs.c
index 2256758..d10587a 100644
--- a/lib/value-pairs.c
+++ b/lib/value-pairs.c
@@ -618,7 +618,10 @@ vp_walker_name_value_split(const gchar *name)
     vp_walker_name_value_split_add_name_token(array, name, &current_name_start_idx, &i);

   if (array->len == 0)
-    return NULL;
+    {
+      g_ptr_array_free(array);
+      return NULL;
+    }

   return array;
 }

There was a proposed patch on github to fix this issue:

https://github.com/balabit/syslog-ng/pull/126

That fix is not correct though, this one definitely fixes a leak, I'm just not sure if this is the one that affects you.


-- 
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