diff options
author | Andreas Schneider <asn@samba.org> | 2018-05-16 12:05:40 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-05-17 01:09:46 +0200 |
commit | cb9796ffc071c1aa9cd5f1b3ade983978910b29a (patch) | |
tree | fcfdda04fe178b1c651ac1d560bc5864d6adb7be /ctdb/client | |
parent | 76d5f78bb8de7ed8dfbc0d6b237c6d63ea15678f (diff) | |
download | samba-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.c | 4 | ||||
-rw-r--r-- | ctdb/client/client_tunnel.c | 8 |
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); |