wayland: Ensure we close the fd on all error paths in data_source.send

https://bugzilla.gnome.org/show_bug.cgi?id=751414
This commit is contained in:
Carlos Garnacho
2015-06-24 21:55:12 +02:00
parent 3bd7b2a6fb
commit fb266a8876

View File

@ -643,7 +643,10 @@ data_source_send (void *data,
G_STRFUNC, source, mime_type, fd);
if (!mime_type)
return;
{
close (fd);
return;
}
context = gdk_wayland_drag_context_lookup_by_data_source (source);
@ -652,7 +655,10 @@ data_source_send (void *data,
else if (source == wayland_selection->clipboard_source)
window = wayland_selection->clipboard_owner;
else
return;
{
close (fd);
return;
}
if (!gdk_wayland_selection_request_target (wayland_selection, window,
gdk_atom_intern (mime_type, FALSE),