commit e0f31168f1232aabfbe667e8b846d12e06ec182d
parent 17a0344495fc8fd3a12077b5f98fcd380c621268
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 27 Feb 2018 23:38:10 +0100
fix leaks in testcase
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c
@@ -104,6 +104,8 @@ ahc_echo (void *cls,
printf ("Invalid upload data `%8s'!\n", upload_data);
return MHD_NO;
}
+ if (0 == have)
+ return MHD_YES;
if (0 == memcmp (upload_data, &"Hello123"[*done], have))
{
*done += have;
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c
@@ -145,12 +145,12 @@ testLongUrlGet ()
curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1);
curl_easy_perform (c);
curl_easy_cleanup (c);
+ free (url);
}
fprintf (stderr, "\n");
zzuf_socat_stop ();
MHD_stop_daemon (d);
- free (url);
return 0;
}
@@ -210,12 +210,12 @@ testLongHeaderGet ()
curl_slist_free_all (header);
header = NULL;
curl_easy_cleanup (c);
+ free (url);
}
fprintf (stderr, "\n");
zzuf_socat_stop ();
MHD_stop_daemon (d);
- free (url);
return 0;
}