From 3ef6ca8044260c77118edca6dead807a2edcb5ef Mon Sep 17 00:00:00 2001
From: Balazs Scheidler <bazsi@balabit.hu>
Date: Thu, 31 Oct 2013 13:20:12 +0100
Subject: [PATCH] cfg: free global LogTemplateOptions

Upstream-Status: Backport

This fixes a potential memory leak when global template specific
options were specified, such as local-time-zone(), send-time-zone() etc.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
---
 lib/cfg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/cfg.c b/lib/cfg.c
index 7f040b8..adeaaf8 100644
--- a/lib/cfg.c
+++ b/lib/cfg.c
@@ -411,6 +411,7 @@ cfg_free(GlobalConfig *self)
   g_free(self->proto_template_name);  
   log_template_unref(self->file_template);
   log_template_unref(self->proto_template);
+  log_template_options_destroy(&self->template_options);
 
   if (self->bad_hostname_compiled)
     regfree(&self->bad_hostname);
-- 
1.8.4.1

