From 260a3198f44a4ece60864b6f6caab2ee756ad762 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 2 Dec 2013 05:39:39 -0500 Subject: [PATCH] [util] Plug leak --- util/options.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/options.cc b/util/options.cc index 66b5e151c..3ae2454ff 100644 --- a/util/options.cc +++ b/util/options.cc @@ -369,11 +369,12 @@ void output_options_t::add_options (option_parser_t *parser) { const char *text; + char *text_free = NULL; if (NULL == supported_formats) text = "Set output format"; else - text = g_strdup_printf ("Set output format\n\n Supported formats are: %s", supported_formats); + text = text_free = g_strdup_printf ("Set output format\n\n Supported formats are: %s", supported_formats); GOptionEntry entries[] = { @@ -386,6 +387,8 @@ output_options_t::add_options (option_parser_t *parser) "Output options:", "Options controlling the output", this); + + g_free (text_free); }