]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Fixed memory leak in CONNECT tunnel support.
authorStephan Bosch <stephan@rename-it.nl>
Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)
committerStephan Bosch <stephan@rename-it.nl>
Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)
Forgot to dereference streams once tunnel was completed and passed to the new connection object.

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

index 8cf030bef16d11d4525ef0d9c473cde708f3f3e5..65df4d396f3c9c3afea673cfeeac4b988fa97031 100644 (file)
@@ -1162,6 +1162,8 @@ http_client_connection_tunnel_response(const struct http_response *response,
 
        connection_init_from_streams
                (conn->client->conn_list, &conn->conn, name, tunnel.input, tunnel.output);
+       i_stream_unref(&tunnel.input);
+       o_stream_unref(&tunnel.output);
        conn->connect_initialized = TRUE;
 }