From: Volker Lendecke Date: Mon, 18 Aug 2025 08:50:33 +0000 (+0200) Subject: lib: tevent_req_set_endtime() can fail X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ada25fd8eff6e792709429ea3610cb29e1da33fd;p=thirdparty%2Fsamba.git lib: tevent_req_set_endtime() can fail Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c index ea2e8eead0e..2a36e9ea3ee 100644 --- a/lib/util/util_runcmd.c +++ b/lib/util/util_runcmd.c @@ -213,7 +213,10 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx, tevent_fd_set_auto_close(state->fde_status); if (!timeval_is_zero(&endtime)) { - tevent_req_set_endtime(req, ev, endtime); + bool ok = tevent_req_set_endtime(req, ev, endtime); + if (!ok) { + return tevent_req_post(req, ev); + } } return req;