From: Amitay Isaacs Date: Wed, 11 Jan 2017 08:54:36 +0000 (+1100) Subject: ctdb-common: Avoid any processing after finishing tevent_req X-Git-Tag: talloc-2.1.9~377 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d09469e575233242eab2a8c1c0767f52e7cad1e5;p=thirdparty%2Fsamba.git ctdb-common: Avoid any processing after finishing tevent_req BUG: https://bugzilla.samba.org/show_bug.cgi?id=12510 Signed-off-by: Amitay Isaacs Reviewed-by: Stefan Metzmacher --- diff --git a/ctdb/common/sock_daemon.c b/ctdb/common/sock_daemon.c index 08102c38642..3b679ab1332 100644 --- a/ctdb/common/sock_daemon.c +++ b/ctdb/common/sock_daemon.c @@ -703,13 +703,12 @@ static void sock_daemon_run_socket_fail(struct tevent_req *subreq) status = sock_socket_start_recv(subreq, &ret); TALLOC_FREE(subreq); + sock_daemon_run_shutdown(req); if (! status) { tevent_req_error(req, ret); } else { tevent_req_done(req); } - - sock_daemon_run_shutdown(req); } static void sock_daemon_run_watch_pid(struct tevent_req *subreq)