From 73bdc0ce85583f65632d4de4b167295dbb06ee6d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 4 Sep 2013 22:32:50 -0700 Subject: [PATCH] xwm: Fix fd leak in weston_wm_send_data() The call to source->send(source, mime_type, p[1]); dups the fd, and we have to close p[1] to not leak it. --- src/xwayland/selection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xwayland/selection.c b/src/xwayland/selection.c index 76063df..b694477 100644 --- a/src/xwayland/selection.c +++ b/src/xwayland/selection.c @@ -447,6 +447,7 @@ weston_wm_send_data(struct weston_wm *wm, xcb_atom_t target, const char *mime_ty source = seat->selection_data_source; source->send(source, mime_type, p[1]); + close(p[1]); } static void -- 2.7.4