summaryrefslogtreecommitdiff
path: root/ctdb/client
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-05-16 12:05:40 +0200
committerAndrew Bartlett <abartlet@samba.org>2018-05-17 01:09:46 +0200
commitcb9796ffc071c1aa9cd5f1b3ade983978910b29a (patch)
treefcfdda04fe178b1c651ac1d560bc5864d6adb7be /ctdb/client
parent76d5f78bb8de7ed8dfbc0d6b237c6d63ea15678f (diff)
downloadsamba-cb9796ffc071c1aa9cd5f1b3ade983978910b29a.tar.gz
ctdb: Check return values of tevent_req_set_endtime()
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu May 17 01:09:46 CEST 2018 on sn-devel-144
Diffstat (limited to 'ctdb/client')
-rw-r--r--ctdb/client/client_control.c4
-rw-r--r--ctdb/client/client_tunnel.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/ctdb/client/client_control.c b/ctdb/client/client_control.c
index 1755eccf65d..ab0aac8baf5 100644
--- a/ctdb/client/client_control.c
+++ b/ctdb/client/client_control.c
@@ -112,7 +112,9 @@ struct tevent_req *ctdb_client_control_send(TALLOC_CTX *mem_ctx,
}
if (!tevent_timeval_is_zero(&timeout)) {
- tevent_req_set_endtime(req, ev, timeout);
+ if (!tevent_req_set_endtime(req, ev, timeout)) {
+ return tevent_req_post(req, ev);
+ }
}
subreq = comm_write_send(state, ev, client->comm, buf, buflen);
diff --git a/ctdb/client/client_tunnel.c b/ctdb/client/client_tunnel.c
index 17b65469ae9..0bd7a3aff8c 100644
--- a/ctdb/client/client_tunnel.c
+++ b/ctdb/client/client_tunnel.c
@@ -457,7 +457,9 @@ struct tevent_req *ctdb_tunnel_request_send(TALLOC_CTX *mem_ctx,
}
if (!tevent_timeval_is_zero(&timeout)) {
- tevent_req_set_endtime(req, ev, timeout);
+ if (!tevent_req_set_endtime(req, ev, timeout)) {
+ return tevent_req_post(req, ev);
+ }
}
subreq = comm_write_send(state, ev, tctx->client->comm,
@@ -619,7 +621,9 @@ struct tevent_req *ctdb_tunnel_reply_send(TALLOC_CTX *mem_ctx,
}
if (!tevent_timeval_is_zero(&timeout)) {
- tevent_req_set_endtime(req, ev, timeout);
+ if (!tevent_req_set_endtime(req, ev, timeout)) {
+ return tevent_req_post(req, ev);
+ }
}
subreq = comm_write_send(state, ev, tctx->client->comm, pkt, pkt_len);