aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-02-27 21:04:09 +0100
committerChristian Grothoff <christian@grothoff.org>2021-02-27 21:04:09 +0100
commit39813f4f284c69a7133889e1f295fe422b5bf31a (patch)
tree0b5be9e5557b8eb9e0505610641c2599319e5ec1
parent6b3d0c27b79ef0622ce1b0147bdaeabee97ff59e (diff)
downloadlibmicrohttpd-39813f4f284c69a7133889e1f295fe422b5bf31a.tar.gz
libmicrohttpd-39813f4f284c69a7133889e1f295fe422b5bf31a.zip
fix leak
-rw-r--r--src/testcurl/test_get_iovec.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/testcurl/test_get_iovec.c b/src/testcurl/test_get_iovec.c
index 1d817851..0c58f26f 100644
--- a/src/testcurl/test_get_iovec.c
+++ b/src/testcurl/test_get_iovec.c
@@ -95,14 +95,11 @@ iov_free_callback (void *cls)
95static void 95static void
96iovncont_free_callback (void *cls) 96iovncont_free_callback (void *cls)
97{ 97{
98 struct MHD_IoVec *iov = (struct MHD_IoVec *) cls; 98 struct MHD_IoVec *iov = cls;
99 int i; 99 unsigned int i;
100 100
101 for (i = 0; i < TESTSTR_IOVCNT; ++i) 101 for (i = 0; i < TESTSTR_IOVCNT; ++i)
102 {
103 free (iov[i].iov_base); 102 free (iov[i].iov_base);
104 }
105
106 free (iov); 103 free (iov);
107} 104}
108 105
@@ -236,7 +233,9 @@ ncont_echo (void *cls,
236 TESTSTR_IOVCNT, 233 TESTSTR_IOVCNT,
237 &iovncont_free_callback, 234 &iovncont_free_callback,
238 iov); 235 iov);
239 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 236 ret = MHD_queue_response (connection,
237 MHD_HTTP_OK,
238 response);
240 MHD_destroy_response (response); 239 MHD_destroy_response (response);
241 if (ret == MHD_NO) 240 if (ret == MHD_NO)
242 abort (); 241 abort ();
@@ -248,7 +247,7 @@ err_out:
248 if (NULL != iov[j].iov_base) 247 if (NULL != iov[j].iov_base)
249 free (iov[j].iov_base); 248 free (iov[j].iov_base);
250 } 249 }
251 250 free (iov);
252 return MHD_NO; 251 return MHD_NO;
253} 252}
254 253