From dfa0f9444e9b5dbef4ebc3835a7a7d46b17a0b6d Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 30 Nov 2014 13:32:27 +0800 Subject: [PATCH] coverity 83685 daemonize put the close in the right place Signed-off-by: Andy Green --- lib/daemonize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/daemonize.c b/lib/daemonize.c index adbe664e..99f18b79 100644 --- a/lib/daemonize.c +++ b/lib/daemonize.c @@ -121,8 +121,8 @@ lws_daemonize(const char *_lock_path) _lock_path, n); unlink(lock_path); } - } else close(fd); + } n = strlen(_lock_path) + 1; lock_path = malloc(n);