[mutter/wip/carlosg/pipe-leak: 2/2] wayland: Close pipe file descriptors after use
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/pipe-leak: 2/2] wayland: Close pipe file descriptors after use
- Date: Tue, 25 May 2021 16:31:12 +0000 (UTC)
commit 4ed05830e20f4d87a580c8d5073996d97a0975a4
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue May 18 17:57:56 2021 +0200
wayland: Close pipe file descriptors after use
Both ends were being leaked here, one directly, other through the
GIOChannel.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4302
(just maybe)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1870>
src/wayland/meta-wayland-data-device.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index dd9c162e77..2f3c154a1d 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -425,7 +425,9 @@ meta_wayland_data_source_fake_read (MetaWaylandDataSource *source,
}
meta_wayland_data_source_send (source, mimetype, p[1]);
+ close (p[1]);
channel = g_io_channel_unix_new (p[0]);
+ g_io_channel_set_close_on_unref (channel, TRUE);
g_io_add_watch (channel, G_IO_HUP, on_fake_read_hup, source);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]