summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2008-05-12 07:05:40 +0000
committerTor Lillqvist <tml@src.gnome.org>2008-05-12 07:05:40 +0000
commit40ae6fc8d2aa3fa1e800516430edafc8ee37de59 (patch)
tree4d5eb6e427310ce0134883750cad1f93d7eec577 /gdk
parent670775d8d8301b4593726a81c8ed3dc7a7bf7cc3 (diff)
downloadgtk+-40ae6fc8d2aa3fa1e800516430edafc8ee37de59.tar.gz
Bug 532059 - Leak in win32 clipboard manipulation
2008-05-12 Tor Lillqvist <tml@novell.com> Bug 532059 - Leak in win32 clipboard manipulation * gdk/win32/gdkselection-win32.c (gdk_win32_selection_add_targets): Plug memory leak. Patch by Daniel Atallah. svn path=/trunk/; revision=20092
Diffstat (limited to 'gdk')
-rw-r--r--gdk/win32/gdkselection-win32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index 63e2c24c3f..01e2d7f58f 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -1121,10 +1121,11 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
{
gchar **mime_types =
gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) format->data);
+ gchar **mime_type;
- for (; *mime_types; ++mime_types)
+ for (mime_type = mime_types; *mime_type; ++mime_type)
{
- if (!strcmp (target_name, *mime_types))
+ if (!strcmp (target_name, *mime_type))
{
g_hash_table_replace (_format_atom_table,
GINT_TO_POINTER (CF_DIB),
@@ -1135,6 +1136,7 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
break;
}
}
+ g_strfreev(mime_types);
}
g_free (target_name);
}