summaryrefslogtreecommitdiff
path: root/gtk/gtkclipboard.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-08-01 14:21:14 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-08-01 14:21:14 +0000
commit04135812bd2372643b2a7a20f2ba46c2778e4e2b (patch)
tree3ccb128e2a1aba07041654a7880edfada4299162 /gtk/gtkclipboard.c
parent888e68c28d1ab860e291ce1b7473bde34454f7c7 (diff)
downloadgdk-pixbuf-04135812bd2372643b2a7a20f2ba46c2778e4e2b.tar.gz
Don't leak atom names. (#311933, Peter Zelezny)
2005-08-01 Matthias Clasen <mclasen@redhat.com> * gtk/gtkclipboard.c (gtk_clipboard_set_image) (gtk_clipboard_set_text): Don't leak atom names. (#311933, Peter Zelezny)
Diffstat (limited to 'gtk/gtkclipboard.c')
-rw-r--r--gtk/gtkclipboard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c
index dde348e1c..74cdf66eb 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);
}