GDK W32: Don't leak the atom name string

https://bugzilla.gnome.org/show_bug.cgi?id=786509
This commit is contained in:
Руслан Ижбулатов 2017-08-22 14:23:14 +00:00
parent c4617d3268
commit 3237c2172a

View File

@ -677,10 +677,11 @@ gdk_win32_display_request_selection_notification (GdkDisplay *display,
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
gboolean ret = FALSE;
gchar *selection_name = gdk_atom_name (selection);
GDK_NOTE (DND,
g_print ("gdk_display_request_selection_notification (..., %s)",
gdk_atom_name (selection)));
selection_name));
if (selection == GDK_SELECTION_CLIPBOARD ||
selection == GDK_SELECTION_PRIMARY)
@ -700,6 +701,8 @@ gdk_win32_display_request_selection_notification (GdkDisplay *display,
ret = FALSE;
}
g_free (selection_name);
GDK_NOTE (DND, g_print (" -> %s\n", ret ? "TRUE" : "FALSE"));
return ret;
}