From 877fa0c66469628748dbd01506f15ddc4f11b849 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 2 Apr 2018 16:41:13 +0100 Subject: [PATCH] xwayland: don't close() fds we don't own MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The glamor_pixmap_from_fds error path erroneously closes the fds. We don't own them, plus the caller closes them after the function in called. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov --- hw/xwayland/xwayland-glamor.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index 7f64483bf..6ba716263 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -704,8 +704,6 @@ glamor_pixmap_from_fds(ScreenPtr screen, return pixmap; error: - for (i = 0; i < num_fds; i++) - close(fds[i]); return NULL; }