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-06 22:32:25 -0500 |
commit | ef94085ff1ad05c1604ad65fa9777976b8d4cdd4 (patch) | |
tree | e5d4620e20b87d4b8650d63fc8d243dcebd1f55a /src/xwayland | |
parent | 0b0be8eaf77366af5a108c7ec0d40c9a501231ea (diff) | |
download | weston-ef94085ff1ad05c1604ad65fa9777976b8d4cdd4.tar.gz weston-ef94085ff1ad05c1604ad65fa9777976b8d4cdd4.tar.bz2 weston-ef94085ff1ad05c1604ad65fa9777976b8d4cdd4.zip |
xwayland: Close fd opened for lockfile on error path
Diffstat (limited to 'src/xwayland')
-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 59154a3e..ddd9640c 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; } |