diff --git a/src/testcurl/https/mhds_get_test.c b/src/testcurl/https/mhds_get_test.c index 9b2f9519..7ba1cd5a 100644 --- a/src/testcurl/https/mhds_get_test.c +++ b/src/testcurl/https/mhds_get_test.c @@ -161,6 +161,7 @@ test_daemon_get (FILE * test_fd, char *cipher_suite, int proto_version) if (NULL == (mem_test_file_local = malloc (len))) { fprintf (stderr, MHD_E_MEM); + free (doc_path); return -1; } diff --git a/src/testcurl/https/mhds_multi_daemon_test.c b/src/testcurl/https/mhds_multi_daemon_test.c index 6407daf7..d663902c 100644 --- a/src/testcurl/https/mhds_multi_daemon_test.c +++ b/src/testcurl/https/mhds_multi_daemon_test.c @@ -160,6 +160,7 @@ test_daemon_get (FILE * test_fd, char *cipher_suite, int proto_version, { fprintf (stderr, "Error: failed to read test file. %s\n", strerror (errno)); + free (mem_test_file_local); free (doc_path); return -1; } diff --git a/src/testcurl/https/tls_daemon_options_test.c b/src/testcurl/https/tls_daemon_options_test.c index 2575c340..b388f24d 100644 --- a/src/testcurl/https/tls_daemon_options_test.c +++ b/src/testcurl/https/tls_daemon_options_test.c @@ -183,6 +183,7 @@ test_https_transfer (FILE * test_fd, char *cipher_suite, int proto_version) { fprintf (stderr, "Error: failed to read test file. %s\n", strerror (errno)); + free (mem_test_file_local); free (doc_path); return -1; } @@ -190,6 +191,7 @@ test_https_transfer (FILE * test_fd, char *cipher_suite, int proto_version) if (NULL == (cbc.buf = malloc (sizeof (char) * len))) { fprintf (stderr, MHD_E_MEM); + free (mem_test_file_local); free (doc_path); return -1; }