commit | ef94085ff1ad05c1604ad65fa9777976b8d4cdd4 | [log] [tgz] |
---|---|---|
author | Rob Bradford <rob@linux.intel.com> | Wed Dec 05 18:47:07 2012 +0000 |
committer | Kristian Høgsberg <krh@bitplanet.net> | Thu Dec 06 22:32:25 2012 -0500 |
tree | e5d4620e20b87d4b8650d63fc8d243dcebd1f55a | |
parent | 0b0be8eaf77366af5a108c7ec0d40c9a501231ea [diff] |
xwayland: Close fd opened for lockfile on error path
diff --git a/src/xwayland/launcher.c b/src/xwayland/launcher.c index 59154a3..ddd9640 100644 --- a/src/xwayland/launcher.c +++ b/src/xwayland/launcher.c
@@ -247,6 +247,9 @@ if (fd < 0 || read(fd, pid, 11) != 11) { weston_log("can't read lock file %s: %s\n", lockfile, strerror(errno)); + if (fd >= 0) + close (fd); + errno = EEXIST; return -1; }