diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-02-27 23:38:10 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-02-27 23:38:10 +0100 |
commit | e0f31168f1232aabfbe667e8b846d12e06ec182d (patch) | |
tree | e4ef4210ddadf6d8eca6b3270a6d34bee0311200 /src | |
parent | 17a0344495fc8fd3a12077b5f98fcd380c621268 (diff) | |
download | libmicrohttpd-e0f31168f1232aabfbe667e8b846d12e06ec182d.tar.gz libmicrohttpd-e0f31168f1232aabfbe667e8b846d12e06ec182d.zip |
fix leaks in testcase
Diffstat (limited to 'src')
-rw-r--r-- | src/testcurl/test_put_chunked.c | 2 | ||||
-rw-r--r-- | src/testzzuf/test_long_header.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c index 479079fb..71e10b77 100644 --- a/src/testcurl/test_put_chunked.c +++ b/src/testcurl/test_put_chunked.c | |||
@@ -104,6 +104,8 @@ ahc_echo (void *cls, | |||
104 | printf ("Invalid upload data `%8s'!\n", upload_data); | 104 | printf ("Invalid upload data `%8s'!\n", upload_data); |
105 | return MHD_NO; | 105 | return MHD_NO; |
106 | } | 106 | } |
107 | if (0 == have) | ||
108 | return MHD_YES; | ||
107 | if (0 == memcmp (upload_data, &"Hello123"[*done], have)) | 109 | if (0 == memcmp (upload_data, &"Hello123"[*done], have)) |
108 | { | 110 | { |
109 | *done += have; | 111 | *done += have; |
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c index c4e5cf81..fd0598f1 100644 --- a/src/testzzuf/test_long_header.c +++ b/src/testzzuf/test_long_header.c | |||
@@ -145,12 +145,12 @@ testLongUrlGet () | |||
145 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); | 145 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); |
146 | curl_easy_perform (c); | 146 | curl_easy_perform (c); |
147 | curl_easy_cleanup (c); | 147 | curl_easy_cleanup (c); |
148 | free (url); | ||
148 | } | 149 | } |
149 | fprintf (stderr, "\n"); | 150 | fprintf (stderr, "\n"); |
150 | zzuf_socat_stop (); | 151 | zzuf_socat_stop (); |
151 | 152 | ||
152 | MHD_stop_daemon (d); | 153 | MHD_stop_daemon (d); |
153 | free (url); | ||
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | 156 | ||
@@ -210,12 +210,12 @@ testLongHeaderGet () | |||
210 | curl_slist_free_all (header); | 210 | curl_slist_free_all (header); |
211 | header = NULL; | 211 | header = NULL; |
212 | curl_easy_cleanup (c); | 212 | curl_easy_cleanup (c); |
213 | free (url); | ||
213 | } | 214 | } |
214 | fprintf (stderr, "\n"); | 215 | fprintf (stderr, "\n"); |
215 | zzuf_socat_stop (); | 216 | zzuf_socat_stop (); |
216 | 217 | ||
217 | MHD_stop_daemon (d); | 218 | MHD_stop_daemon (d); |
218 | free (url); | ||
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
221 | 221 | ||