mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 09:38:09 +02:00
xwayland: Close fd opened for lockfile on error path
This commit is contained in:
parent
b27094f1b2
commit
8104ec5dd5
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue