diff options
author | Rob Bradford <rob@linux.intel.com> | 2012-12-05 18:47:07 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-12-11 23:47:20 -0500 |
commit | 8104ec5dd55071ad30669592f91fe2efc134447d (patch) | |
tree | 86451c11b865eca59607709a3c3194a58ecf8652 | |
parent | b27094f1b2d57f66e9053b764e3c74c57a28ee62 (diff) | |
download | weston-8104ec5dd55071ad30669592f91fe2efc134447d.tar.gz |
xwayland: Close fd opened for lockfile on error path
-rw-r--r-- | src/xwayland/launcher.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xwayland/launcher.c b/src/xwayland/launcher.c index 00f064eb..9155c09f 100644 --- a/src/xwayland/launcher.c +++ b/src/xwayland/launcher.c @@ -247,6 +247,9 @@ create_lockfile(int display, char *lockfile, size_t lsize) 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; } |