From 867dc836abb8904f324f5904d8714012fab33bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 10 Mar 2020 18:01:30 +0100 Subject: [PATCH] shm: set pool_fd=1 after closing it, to avoid double-closing on error --- shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shm.c b/shm.c index ba88b361..95b7ac78 100644 --- a/shm.c +++ b/shm.c @@ -164,7 +164,7 @@ shm_get_buffer(struct wl_shm *shm, int width, int height, unsigned long cookie) /* We use the entire pool for our single buffer */ wl_shm_pool_destroy(pool); pool = NULL; - close(pool_fd); + close(pool_fd); pool_fd = -1; /* One pixman image for each worker thread (do we really need multiple?) */ pix = pixman_image_create_bits_no_clear(