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



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

    widgets: Use the cleanup attribute to clean up

 src/terminal-info-bar.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/terminal-info-bar.c b/src/terminal-info-bar.c
index e6204c7..6503bab 100644
--- a/src/terminal-info-bar.c
+++ b/src/terminal-info-bar.c
@@ -18,6 +18,7 @@
 #include <config.h>
 
 #include "terminal-info-bar.h"
+#include "terminal-libgsystem.h"
 
 #include <gtk/gtk.h>
 
@@ -94,7 +95,7 @@ terminal_info_bar_format_text (TerminalInfoBar *bar,
                                ...)
 {
   TerminalInfoBarPrivate *priv;
-  char *text;
+  gs_free char *text;
   GtkWidget *label;
   va_list args;
 
@@ -107,8 +108,7 @@ terminal_info_bar_format_text (TerminalInfoBar *bar,
   va_end (args);
 
   label = gtk_label_new (text);
-  g_free (text);
-  
+
   gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);


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