From a269669ba3cb6d1c06a3322b4a6a035cb787d085 Mon Sep 17 00:00:00 2001
From: Gergely Nagy <algernon@balabit.hu>
Date: Tue, 14 Jan 2014 13:58:05 +0100
Subject: [PATCH] driver: Fix a memory leak in log_driver_free()

Upstream-Status: Backport

After freeing up the members of self->plugins, free self->plugins itself
too.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
---
 lib/driver.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/driver.c b/lib/driver.c
index d77fe57..a6867b9 100644
--- a/lib/driver.c
+++ b/lib/driver.c
@@ -91,6 +91,10 @@ log_driver_free(LogPipe *s)
     {
       log_driver_plugin_free((LogDriverPlugin *) l->data);
     }
+  if (self->plugins)
+    {
+      g_list_free(self->plugins);
+    }
   if (self->group)
     g_free(self->group);
   if (self->id)
-- 
1.8.4.1

