projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31dd6b8
)
xserver: Don't leak lockfile fd on error path
author
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 10 Apr 2012 02:13:17 +0000
(22:13 -0400)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 10 Apr 2012 04:04:57 +0000
(
00:04
-0400)
src/xserver-launcher.c
patch
|
blob
|
history
diff --git
a/src/xserver-launcher.c
b/src/xserver-launcher.c
index
502b9d4
..
d3657c8
100644
(file)
--- a/
src/xserver-launcher.c
+++ b/
src/xserver-launcher.c
@@
-1645,6
+1645,7
@@
create_lockfile(int display, char *lockfile, size_t lsize)
if (end != pid + 10) {
fprintf(stderr, "can't parse lock file %s\n",
lockfile);
+ close(fd);
errno = EEXIST;
return -1;
}
@@
-1655,6
+1656,7
@@
create_lockfile(int display, char *lockfile, size_t lsize)
"unlinking stale lock file %s\n", lockfile);
unlink(lockfile);
errno = EAGAIN;
+ close(fd);
return -1;
}