Commit b744883e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

cr_service(): close fd on error

... and don't return -1.

This is a missing part from commit 34772230.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6bfc566d
...@@ -400,7 +400,7 @@ int cr_service(bool daemon_mode) ...@@ -400,7 +400,7 @@ int cr_service(bool daemon_mode)
if (opts.pidfile) { if (opts.pidfile) {
if (write_pidfile(getpid()) == -1) { if (write_pidfile(getpid()) == -1) {
pr_perror("Can't write pidfile"); pr_perror("Can't write pidfile");
return -1; goto err;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment