mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-07 02:45:15 +00:00
xwayland: Close fd opened for lockfile on error path
This commit is contained in:
parent
0b0be8eaf7
commit
ef94085ff1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue