From: Amitay Isaacs Date: Wed, 10 Oct 2018 07:19:32 +0000 (+1100) Subject: ctdb-event: Check the return status of sock_daemon_set_startup_fd X-Git-Tag: tdb-1.3.17~1266 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a1909603808b994b7822b697494e39e8da4aaa66;p=thirdparty%2Fsamba.git ctdb-event: Check the return status of sock_daemon_set_startup_fd BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/event/event_daemon.c b/ctdb/event/event_daemon.c index c1c6852cca5..3cab3306b02 100644 --- a/ctdb/event/event_daemon.c +++ b/ctdb/event/event_daemon.c @@ -244,6 +244,7 @@ int main(int argc, const char **argv) const char *t; int interactive = 0; int opt, ret; + bool ok; pc = poptGetContext(argv[0], argc, @@ -343,7 +344,11 @@ int main(int argc, const char **argv) } if (options.startup_fd != -1) { - sock_daemon_set_startup_fd(e_state->sockd, options.startup_fd); + ok = sock_daemon_set_startup_fd(e_state->sockd, + options.startup_fd); + if (!ok) { + goto fail; + } } ret = sock_daemon_run(e_state->ev,