[gnome-packagekit/glib2: 46/79] Don't try to access freed memory when we watch a transaction



commit c118e50ad6f5c33f569ce5ce53b959c8c809c5c8
Author: Richard Hughes <richard hughsie com>
Date:   Sun Sep 27 11:22:26 2009 +0100

    Don't try to access freed memory when we watch a transaction

 src/gpk-watch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-watch.c b/src/gpk-watch.c
index 116b6e2..68cf443 100644
--- a/src/gpk-watch.c
+++ b/src/gpk-watch.c
@@ -832,7 +832,7 @@ gpk_watch_populate_menu_with_jobs (GpkWatch *watch, GtkMenu *menu)
 		widget = gtk_image_menu_item_new_with_mnemonic (text);
 
 		/* we need the job ID so we know what transaction to show */
-		g_object_set_data (G_OBJECT (widget), "tid", (gpointer) transaction_id);
+		g_object_set_data_full (G_OBJECT (widget), "tid", g_strdup (transaction_id), g_free);
 
 		image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
 		gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image);



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