From 04135812bd2372643b2a7a20f2ba46c2778e4e2b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 1 Aug 2005 14:21:14 +0000 Subject: [PATCH] Don't leak atom names. (#311933, Peter Zelezny) 2005-08-01 Matthias Clasen * gtk/gtkclipboard.c (gtk_clipboard_set_image) (gtk_clipboard_set_text): Don't leak atom names. (#311933, Peter Zelezny) --- ChangeLog | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-8 | 4 ++++ gtk/gtkclipboard.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9a68b6b7e8..ccd6fe11a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-08-01 Matthias Clasen + * gtk/gtkclipboard.c (gtk_clipboard_set_image) + (gtk_clipboard_set_text): Don't leak atom names. (#311933, + Peter Zelezny) + * gtk/gtkmain.c (do_post_parse_initialization): Call gettext_initialization() here as well. (#311612, Dan Winship) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9a68b6b7e8..ccd6fe11a1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,9 @@ 2005-08-01 Matthias Clasen + * gtk/gtkclipboard.c (gtk_clipboard_set_image) + (gtk_clipboard_set_text): Don't leak atom names. (#311933, + Peter Zelezny) + * gtk/gtkmain.c (do_post_parse_initialization): Call gettext_initialization() here as well. (#311612, Dan Winship) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9a68b6b7e8..ccd6fe11a1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,9 @@ 2005-08-01 Matthias Clasen + * gtk/gtkclipboard.c (gtk_clipboard_set_image) + (gtk_clipboard_set_text): Don't leak atom names. (#311933, + Peter Zelezny) + * gtk/gtkmain.c (do_post_parse_initialization): Call gettext_initialization() here as well. (#311612, Dan Winship) diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c index dde348e1cd..74cdf66ebd 100644 --- a/gtk/gtkclipboard.c +++ b/gtk/gtkclipboard.c @@ -765,6 +765,8 @@ gtk_clipboard_set_text (GtkClipboard *clipboard, g_strndup (text, len)); gtk_clipboard_set_can_store (clipboard, NULL, 0); + for (i = 0; i < n_targets; i++) + g_free (targets[i].target); g_free (targets); gtk_target_list_unref (list); } @@ -826,6 +828,8 @@ gtk_clipboard_set_image (GtkClipboard *clipboard, g_object_ref (pixbuf)); gtk_clipboard_set_can_store (clipboard, NULL, 0); + for (i = 0; i < n_targets; i++) + g_free (targets[i].target); g_free (targets); gtk_target_list_unref (list); }