From 6e1bc1f4a080539860a3f121c5b51c9bfda1f1af Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Sun, 28 Jan 2018 21:39:07 +0100 Subject: [PATCH] lib-http: client: Assert that req->client != NULL in http_client_request_send_error(). Applies when blocking payload output API is being used. Addresses a report by scan-build. --- src/lib-http/http-client-request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index a39f141533..f382966a93 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -1374,8 +1374,10 @@ http_client_request_send_error(struct http_client_request *req, i_stream_unref(&req->payload_input); } } - if (req->payload_wait) + if (req->payload_wait) { + i_assert(req->client != NULL); io_loop_stop(req->client->ioloop); + } return TRUE; } -- 2.47.3