[PATCH 08/10] xwayland: Don't leak fd while reading lock file in src/xwayland/launcher.c

Martin Olsson martin at minimum.se
Sat Jul 7 18:03:45 PDT 2012


---
 src/xwayland/launcher.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/xwayland/launcher.c b/src/xwayland/launcher.c
index 0184c08..035c8e3 100644
--- a/src/xwayland/launcher.c
+++ b/src/xwayland/launcher.c
@@ -274,6 +274,7 @@ create_lockfile(int display, char *lockfile, size_t lsize)
 			return -1;
 		}
 
+		close(fd);
 		errno = EEXIST;
 		return -1;
 	} else if (fd < 0) {
-- 
1.7.9.5



More information about the wayland-devel mailing list