[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8167 - libmicrohttpd/src/testcurl/https
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8167 - libmicrohttpd/src/testcurl/https |
Date: |
Mon, 2 Feb 2009 00:13:22 -0700 (MST) |
Author: grothoff
Date: 2009-02-02 00:13:22 -0700 (Mon, 02 Feb 2009)
New Revision: 8167
Modified:
libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c
libmicrohttpd/src/testcurl/https/tls_authentication_test.c
libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c
libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
libmicrohttpd/src/testcurl/https/tls_thread_mode_test.c
Log:
fix
Modified: libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c 2009-02-02
06:57:28 UTC (rev 8166)
+++ libmicrohttpd/src/testcurl/https/mhds_multi_daemon_test.c 2009-02-02
07:13:22 UTC (rev 8167)
@@ -160,6 +160,7 @@
{
fprintf (stderr, "Error: failed to read test file. %s\n",
strerror (errno));
+ free (doc_path);
return -1;
}
@@ -167,6 +168,8 @@
{
fprintf (stderr, "Error: failed to read test file. %s\n",
strerror (errno));
+ free (mem_test_file_local);
+ free (doc_path);
return -1;
}
cbc.size = len;
@@ -206,6 +209,9 @@
fprintf (stderr, "curl_easy_perform failed: `%s'\n",
curl_easy_strerror (errornum));
curl_easy_cleanup (c);
+ free (mem_test_file_local);
+ free (doc_path);
+ free (cbc.buf);
return errornum;
}
@@ -261,6 +267,7 @@
if (d2 == NULL)
{
+ MHD_stop_daemon(d1);
fprintf (stderr, MHD_E_SERVER_INIT);
return -1;
}
Modified: libmicrohttpd/src/testcurl/https/tls_authentication_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_authentication_test.c 2009-02-02
06:57:28 UTC (rev 8166)
+++ libmicrohttpd/src/testcurl/https/tls_authentication_test.c 2009-02-02
07:13:22 UTC (rev 8167)
@@ -284,12 +284,14 @@
{
fprintf (stderr, "Error: failed to write `%s. %s'\n",
test_file_name, strerror (errno));
+ fclose (test_fd);
return NULL;
}
if (fflush (test_fd))
{
fprintf (stderr, "Error: failed to flush test file stream. %s\n",
strerror (errno));
+ fclose (test_fd);
return NULL;
}
@@ -312,14 +314,14 @@
{
fprintf (stderr, "Error: failed to write `%s. %s'\n",
ca_cert_file_name, strerror (errno));
- fclose (test_fd);
+ fclose (fd);
return NULL;
}
if (fflush (fd))
{
fprintf (stderr, "Error: failed to flush ca cert file stream. %s\n",
strerror (errno));
- fclose (test_fd);
+ fclose (fd);
return NULL;
}
Modified: libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c 2009-02-02
06:57:28 UTC (rev 8166)
+++ libmicrohttpd/src/testcurl/https/tls_daemon_options_test.c 2009-02-02
07:13:22 UTC (rev 8167)
@@ -230,6 +230,9 @@
fprintf (stderr, "curl_easy_perform failed: `%s'\n",
curl_easy_strerror (errornum));
curl_easy_cleanup (c);
+ free (cbc.buf);
+ free (mem_test_file_local);
+ free (doc_path);
return errornum;
}
@@ -240,6 +243,7 @@
fprintf (stderr, "Error: local file & received file differ.\n");
free (cbc.buf);
free (mem_test_file_local);
+ free (doc_path);
return -1;
}
Modified: libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
2009-02-02 06:57:28 UTC (rev 8166)
+++ libmicrohttpd/src/testcurl/https/tls_multi_thread_mode_test.c
2009-02-02 07:13:22 UTC (rev 8167)
@@ -163,44 +163,39 @@
doc_path_len = PATH_MAX > 4096 ? 4096 : PATH_MAX;
if (NULL == (doc_path = malloc (doc_path_len)))
{
- fclose (test_fd);
fprintf (stderr, MHD_E_MEM);
return -1;
}
if (getcwd (doc_path, doc_path_len) == NULL)
{
- fclose (test_fd);
- free (doc_path);
fprintf (stderr, "Error: failed to get working directory. %s\n",
strerror (errno));
+ free (doc_path);
return -1;
}
if (NULL == (mem_test_file_local = malloc (len)))
{
- fclose (test_fd);
- free (doc_path);
fprintf (stderr, MHD_E_MEM);
+ free (doc_path);
return -1;
}
fseek (test_fd, 0, SEEK_SET);
if (fread (mem_test_file_local, sizeof (char), len, test_fd) != len)
{
- fclose (test_fd);
- free (doc_path);
- free (mem_test_file_local);
fprintf (stderr, "Error: failed to read test file. %s\n",
strerror (errno));
+ free (doc_path);
+ free (mem_test_file_local);
return -1;
}
if (NULL == (cbc.buf = malloc (len)))
{
- fclose (test_fd);
+ fprintf (stderr, MHD_E_MEM);
free (doc_path);
free (mem_test_file_local);
- fprintf (stderr, MHD_E_MEM);
return -1;
}
cbc.size = len;
@@ -299,12 +294,14 @@
{
fprintf (stderr, "Error: failed to write `%s. %s'\n",
test_file_name, strerror (errno));
+ fclose (test_fd);
return NULL;
}
if (fflush (test_fd))
{
fprintf (stderr, "Error: failed to flush test file stream. %s\n",
strerror (errno));
+ fclose (test_fd);
return NULL;
}
@@ -453,6 +450,7 @@
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error: %s\n", strerror (errno));
+ fclose (test_fd);
return -1;
}
Modified: libmicrohttpd/src/testcurl/https/tls_thread_mode_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_thread_mode_test.c 2009-02-02
06:57:28 UTC (rev 8166)
+++ libmicrohttpd/src/testcurl/https/tls_thread_mode_test.c 2009-02-02
07:13:22 UTC (rev 8167)
@@ -163,40 +163,37 @@
doc_path_len = PATH_MAX > 4096 ? 4096 : PATH_MAX;
if (NULL == (doc_path = malloc (doc_path_len)))
{
- fclose (test_fd);
fprintf (stderr, MHD_E_MEM);
return -1;
}
if (getcwd (doc_path, doc_path_len) == NULL)
{
- fclose (test_fd);
- free (doc_path);
fprintf (stderr, "Error: failed to get working directory. %s\n",
strerror (errno));
+ free (doc_path);
return -1;
}
if (NULL == (mem_test_file_local = malloc (len)))
{
- fclose (test_fd);
+ fprintf (stderr, MHD_E_MEM);
free (doc_path);
- fprintf (stderr, MHD_E_MEM);
return -1;
}
fseek (test_fd, 0, SEEK_SET);
if (fread (mem_test_file_local, sizeof (char), len, test_fd) != len)
{
+ fprintf (stderr, "Error: failed to read test file. %s\n",
+ strerror (errno));
fclose (test_fd);
free (doc_path);
- fprintf (stderr, "Error: failed to read test file. %s\n",
- strerror (errno));
+ free (mem_test_file_local);
return -1;
}
if (NULL == (cbc.buf = malloc (len)))
{
- fclose (test_fd);
free (doc_path);
free (mem_test_file_local);
fprintf (stderr, MHD_E_MEM);
@@ -298,12 +295,14 @@
{
fprintf (stderr, "Error: failed to write `%s. %s'\n",
test_file_name, strerror (errno));
+ fclose (test_fd);
return NULL;
}
if (fflush (test_fd))
{
fprintf (stderr, "Error: failed to flush test file stream. %s\n",
strerror (errno));
+ fclose (test_fd);
return NULL;
}
@@ -452,6 +451,7 @@
if (0 != curl_global_init (CURL_GLOBAL_ALL))
{
fprintf (stderr, "Error: %s\n", strerror (errno));
+ fclose (test_fd);
return -1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8167 - libmicrohttpd/src/testcurl/https,
gnunet <=