]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Tunnel connection failure would cause segfault.
authorStephan Bosch <stephan@rename-it.nl>
Wed, 10 Sep 2014 10:39:37 +0000 (13:39 +0300)
committerStephan Bosch <stephan@rename-it.nl>
Wed, 10 Sep 2014 10:39:37 +0000 (13:39 +0300)
That happened because it tried to retry waiting requests, which makes no sense for a CONNECT tunnel.

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

index 945db990e651081d0c5d61696bf0bf8ef873cdce..d162df54527d770b81d2411b338be2da6cfb41e9 100644 (file)
@@ -77,6 +77,9 @@ http_client_connection_retry_requests(struct http_client_connection *conn,
 {
        struct http_client_request **req;
 
+       if (!array_is_created(&conn->request_wait_list))
+               return;
+
        array_foreach_modifiable(&conn->request_wait_list, req) {
                if ((*req)->state < HTTP_REQUEST_STATE_FINISHED)
                        http_client_request_retry(*req, status, error);