cr_service(): close fd on error

... and don't return -1.

This is a missing part from commit 3477223.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Kir Kolyshkin 2013-12-12 10:02:25 -08:00 committed by Pavel Emelyanov
parent 6bfc566d0d
commit b744883e42

View file

@ -400,7 +400,7 @@ int cr_service(bool daemon_mode)
if (opts.pidfile) {
if (write_pidfile(getpid()) == -1) {
pr_perror("Can't write pidfile");
return -1;
goto err;
}
}