From: Stephan Bosch Date: Thu, 26 Jan 2023 01:41:05 +0000 (+0100) Subject: lib-http: test-http-payload - Clean up global http client context between tests. X-Git-Tag: 2.4.0~3028 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbdaab7f34bdd734722de40ec80997699f27aff7;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-payload - Clean up global http client context between tests. --- diff --git a/src/lib-http/test-http-payload.c b/src/lib-http/test-http-payload.c index e60d6b6857..8600b2727e 100644 --- a/src/lib-http/test-http-payload.c +++ b/src/lib-http/test-http-payload.c @@ -1008,6 +1008,8 @@ static void test_client_deinit(void) timeout_remove(&to_continue); timeout_remove(&to_client_progress); + + http_client_global_context_free(); } static void @@ -1028,7 +1030,7 @@ test_client_create_clients(const struct http_client_settings *client_set) http_client_init_shared(http_context, NULL)); } - if (!tset.parallel_clients_global) + if (http_context != NULL) http_client_context_unref(&http_context); }