libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 9d6c3deddb486f4c949f5bedbc4695c4c05cae96
parent 499de9db0cba6d33ca3b3ba03042fd3daf2fc42b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sun,  3 Oct 2021 20:43:20 +0300

test_toolarge: fixed leak of the test memory allocation

Diffstat:
Msrc/testcurl/test_toolarge.c | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/testcurl/test_toolarge.c b/src/testcurl/test_toolarge.c @@ -786,17 +786,17 @@ doCurlQueryInThread (struct MHD_Daemon *d, resp_code); mhdErrorExit (); } - - return p->queryError; } - - if (dcbp.pos != expected_data_size) - mhdErrorExit ("libcurl reports wrong size of MHD reply body data"); - else if (0 != memcmp (expected_data, dcbp.buf, - expected_data_size)) - mhdErrorExit ("libcurl reports wrong MHD reply body data"); else - p->queryError = 0; + { + if (dcbp.pos != expected_data_size) + mhdErrorExit ("libcurl reports wrong size of MHD reply body data"); + else if (0 != memcmp (expected_data, dcbp.buf, + expected_data_size)) + mhdErrorExit ("libcurl reports wrong MHD reply body data"); + else + p->queryError = 0; + } curl_easy_cleanup (c); free (dcbp.buf);