]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Assert that req->client != NULL in http_client_request_send_error().
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 28 Jan 2018 20:39:07 +0000 (21:39 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 28 Jan 2018 20:39:07 +0000 (21:39 +0100)
Applies when blocking payload output API is being used.
Addresses a report by scan-build.

src/lib-http/http-client-request.c

index a39f141533b5347624d7796d4d5ba2a2af2e9114..f382966a931c1dfecb23e0857600fc0f8bee3219 100644 (file)
@@ -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;
 }