aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_toolarge.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-03 20:43:20 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-03 20:43:20 +0300
commit9d6c3deddb486f4c949f5bedbc4695c4c05cae96 (patch)
tree397f78423f653f2bdc73c9e3508091a542ee279f /src/testcurl/test_toolarge.c
parent499de9db0cba6d33ca3b3ba03042fd3daf2fc42b (diff)
downloadlibmicrohttpd-9d6c3deddb486f4c949f5bedbc4695c4c05cae96.tar.gz
libmicrohttpd-9d6c3deddb486f4c949f5bedbc4695c4c05cae96.zip
test_toolarge: fixed leak of the test memory allocation
Diffstat (limited to 'src/testcurl/test_toolarge.c')
-rw-r--r--src/testcurl/test_toolarge.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/testcurl/test_toolarge.c b/src/testcurl/test_toolarge.c
index 30f9009d..74cd3b4c 100644
--- a/src/testcurl/test_toolarge.c
+++ b/src/testcurl/test_toolarge.c
@@ -786,17 +786,17 @@ doCurlQueryInThread (struct MHD_Daemon *d,
786 resp_code); 786 resp_code);
787 mhdErrorExit (); 787 mhdErrorExit ();
788 } 788 }
789
790 return p->queryError;
791 } 789 }
792
793 if (dcbp.pos != expected_data_size)
794 mhdErrorExit ("libcurl reports wrong size of MHD reply body data");
795 else if (0 != memcmp (expected_data, dcbp.buf,
796 expected_data_size))
797 mhdErrorExit ("libcurl reports wrong MHD reply body data");
798 else 790 else
799 p->queryError = 0; 791 {
792 if (dcbp.pos != expected_data_size)
793 mhdErrorExit ("libcurl reports wrong size of MHD reply body data");
794 else if (0 != memcmp (expected_data, dcbp.buf,
795 expected_data_size))
796 mhdErrorExit ("libcurl reports wrong MHD reply body data");
797 else
798 p->queryError = 0;
799 }
800 800
801 curl_easy_cleanup (c); 801 curl_easy_cleanup (c);
802 free (dcbp.buf); 802 free (dcbp.buf);