]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: tevent_req_set_endtime() can fail
authorVolker Lendecke <vl@samba.org>
Mon, 18 Aug 2025 08:50:33 +0000 (10:50 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 2 Sep 2025 08:08:28 +0000 (08:08 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
lib/util/util_runcmd.c

index ea2e8eead0efd9c76f55d2bfab74911216c7d3d1..2a36e9ea3eeef1567fecff231a6f2af4be00f9ba 100644 (file)
@@ -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;