mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity 83687 daemonize was not a close problem
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
b03430745b
commit
0c5f6709a8
1 changed files with 1 additions and 2 deletions
|
@ -105,7 +105,7 @@ lws_daemonize(const char *_lock_path)
|
|||
return 1;
|
||||
|
||||
fd = open(_lock_path, O_RDONLY);
|
||||
if (fd > 0) {
|
||||
if (fd >= 0) {
|
||||
n = read(fd, buf, sizeof(buf));
|
||||
close(fd);
|
||||
if (n) {
|
||||
|
@ -121,7 +121,6 @@ lws_daemonize(const char *_lock_path)
|
|||
_lock_path, n);
|
||||
unlink(lock_path);
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
|
||||
n = strlen(_lock_path) + 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue