From bbe78ca5a217eeba69a1e9189d8922c637d124f7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 17 Sep 2011 19:49:01 +0200 Subject: s3:libsmb: return if tevent_req_set_endtime() fails tevent_req_set_endtime() already calls tevent_req_nomem(). metze --- source3/libsmb/async_smb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 8966794ab6..8336ec255a 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -420,7 +420,7 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx, if (cli->timeout) { endtime = timeval_current_ofs_msec(cli->timeout); if (!tevent_req_set_endtime(result, ev, endtime)) { - tevent_req_oom(result); + return result; } } @@ -563,7 +563,9 @@ struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx, if (req == NULL) { return NULL; } - + if (!tevent_req_is_in_progress(req)) { + return tevent_req_post(req, ev); + } status = cli_smb_req_send(req); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); -- cgit