[gnome-terminal] utils: Use the cleanup attribute to clean up



commit 285db591ac90730557d959524e58d8a0def27ed2
Author: Christian Persch <chpe gnome org>
Date:   Mon Oct 21 17:55:46 2013 +0200

    utils: Use the cleanup attribute to clean up

 src/terminal-client-utils.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/terminal-client-utils.c b/src/terminal-client-utils.c
index 737240f..1e8cf3b 100644
--- a/src/terminal-client-utils.c
+++ b/src/terminal-client-utils.c
@@ -22,6 +22,7 @@
 #include "config.h"
 
 #include "terminal-client-utils.h"
+#include "terminal-libgsystem.h"
 
 #include <string.h>
 
@@ -100,7 +101,7 @@ terminal_client_append_exec_options (GVariantBuilder *builder,
                                      const char      *working_directory,
                                      gboolean         shell)
 {
-  char **envv;
+  gs_strfreev char **envv;
 
   envv = g_get_environ ();
   envv = g_environ_unsetenv (envv, "COLORTERM");
@@ -127,8 +128,6 @@ terminal_client_append_exec_options (GVariantBuilder *builder,
     g_variant_builder_add (builder, "{sv}",
                            "shell",
                            g_variant_new_boolean (TRUE));
-
-  g_strfreev (envv);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]