[syslog-ng] [PATCH (3.4)] value-pairs: Fix the error handling in the command-line parser.

Gergely Nagy algernon at balabit.hu
Fri Nov 18 17:19:00 CET 2011


When an error occurs during command-line parsing, do not attempt to
free argv: it's not owned by us anymore.

Signed-off-by: Gergely Nagy <algernon at balabit.hu>
---
 lib/value-pairs.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/lib/value-pairs.c b/lib/value-pairs.c
index fcaa401..c58d294 100644
--- a/lib/value-pairs.c
+++ b/lib/value-pairs.c
@@ -465,7 +465,6 @@ value_pairs_new_from_cmdline (GlobalConfig *cfg,
     {
       value_pairs_free (vp);
       g_option_context_free (ctx);
-      g_free (argv);
       return NULL;
     }
   g_option_context_free (ctx);
-- 
1.7.7.3




More information about the syslog-ng mailing list