mirror of
https://github.com/troglobit/finit.git
synced 2026-10-26 12:14:37 +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 */
|
/* fallthrough */
|
||||||
case SVC_NOTIFY_S6:
|
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);
|
result = uev_io_init(ctx, &svc->notify_watcher, service_notify_cb, svc, sd, UEV_READ);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
err(1, "%s: failed setting up notify callback", svc_ident(svc, NULL, 0));
|
err(1, "%s: failed setting up notify callback", svc_ident(svc, NULL, 0));
|
||||||
if (svc->notify == SVC_NOTIFY_S6)
|
|
||||||
close(fd);
|
|
||||||
close(sd);
|
close(sd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user