[gnome-utils/gnome-2-28] Make sure we don't double-free the old name (#595352).



commit 3d7380a6ab0d6ac8835fc5aa42bae001c3c8efb7
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Oct 20 18:59:33 2009 +0200

    Make sure we don't double-free the old name (#595352).

 logview/logview-filter-manager.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/logview/logview-filter-manager.c b/logview/logview-filter-manager.c
index bc71c5f..6d5fd30 100644
--- a/logview/logview-filter-manager.c
+++ b/logview/logview-filter-manager.c
@@ -260,7 +260,6 @@ on_dialog_add_edit_reponse (GtkWidget *dialog, int response_id,
     logview_filter_manager_update_model (manager);
   }
 
-  g_free (old_name);
   gtk_widget_destroy (dialog);
 }
 
@@ -376,11 +375,10 @@ run_add_edit_dialog (LogviewFilterManager *manager, LogviewFilter *filter)
     }
 
     g_free (regex);
-    g_free (name);
     g_object_unref (tag);
   }
 
-  g_object_set_data (G_OBJECT (manager), "old_name", name);
+  g_object_set_data_full (G_OBJECT (manager), "old_name", name, g_free);
 
   g_signal_connect (G_OBJECT (dialog), "response",
                     G_CALLBACK (on_dialog_add_edit_reponse), manager);



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