mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
Fix double-close, found by Coverity Scan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 file changed
+3
-3
+3
-3
@@ -721,12 +721,12 @@ static int service_start(svc_t *svc)
|
||||
}
|
||||
/* fallthrough */
|
||||
case SVC_NOTIFY_S6:
|
||||
close(fd); /* client-end of pipefd for s6 notify */
|
||||
if (svc->notify == SVC_NOTIFY_S6)
|
||||
close(fd); /* client-end of pipefd for s6 notify */
|
||||
|
||||
result = uev_io_init(ctx, &svc->notify_watcher, service_notify_cb, svc, sd, UEV_READ);
|
||||
if (result < 0) {
|
||||
err(1, "%s: failed setting up notify callback", svc_ident(svc, NULL, 0));
|
||||
if (svc->notify == SVC_NOTIFY_S6)
|
||||
close(fd);
|
||||
close(sd);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user