aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-17 19:31:08 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-17 19:31:08 +0300
commitbbca0b654ba921247aa79e02ea43e5f5e1e57496 (patch)
tree019e2ffaba182aac8ef63657642f6c2ebf896d9e
parenta378a81ca755665d1e5aa914e03b1894fc8361ac (diff)
downloadlibmicrohttpd-bbca0b654ba921247aa79e02ea43e5f5e1e57496.tar.gz
libmicrohttpd-bbca0b654ba921247aa79e02ea43e5f5e1e57496.zip
test_tricky: fixed leaked resource
-rw-r--r--src/testcurl/test_tricky.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testcurl/test_tricky.c b/src/testcurl/test_tricky.c
index d2f5b6d1..039ef009 100644
--- a/src/testcurl/test_tricky.c
+++ b/src/testcurl/test_tricky.c
@@ -753,9 +753,11 @@ performTestQueries (struct MHD_Daemon *d, int d_port,
753 if (tricky_url) 753 if (tricky_url)
754 { 754 {
755#if CURL_AT_LEAST_VERSION (7, 62, 0) 755#if CURL_AT_LEAST_VERSION (7, 62, 0)
756 qParam.url = curl_url (); 756 CURLU *url;
757 if (NULL == qParam.url) 757 url = curl_url ();
758 if (NULL == url)
758 externalErrorExit (); 759 externalErrorExit ();
760 qParam.url = url;
759 761
760 if ((CURLUE_OK != curl_url_set (qParam.url, CURLUPART_SCHEME, "http", 0)) || 762 if ((CURLUE_OK != curl_url_set (qParam.url, CURLUPART_SCHEME, "http", 0)) ||
761 (CURLUE_OK != curl_url_set (qParam.url, CURLUPART_HOST, URL_HOST, 763 (CURLUE_OK != curl_url_set (qParam.url, CURLUPART_HOST, URL_HOST,
@@ -811,7 +813,7 @@ performTestQueries (struct MHD_Daemon *d, int d_port,
811 if (! ahc_param->header_check_param.found_header4) 813 if (! ahc_param->header_check_param.found_header4)
812 mhdErrorExitDesc ("Required header4 was not detected in request"); 814 mhdErrorExitDesc ("Required header4 was not detected in request");
813 } 815 }
814 816 curl_url_cleanup (url);
815#else 817#else
816 fprintf (stderr, "This test requires libcurl version 7.62.0 or newer.\n"); 818 fprintf (stderr, "This test requires libcurl version 7.62.0 or newer.\n");
817 abort (); 819 abort ();