commit d728fa1b45f8487e4d191429a78b401fad433be0
parent d33dea21fe672967ad39afdf099174b783523798
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 6 Aug 2010 10:52:44 +0000
fixing memory leak
Diffstat:
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/AUTHORS b/AUTHORS
@@ -23,6 +23,7 @@ Mika Raento <mikie@iki.fi>
Mike Crowe <mac@mcrowe.com>
John Muth <muth@parascale.com>
Geoffrey McRae <geoff@spacevs.com>
+Piotr Grzybowski <narsil.pl@gmail.com>
Documentation contributions also came from:
Marco Maggi <marco.maggi-ipsu@poste.it>
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Aug 6 12:51:59 CEST 2010
+ Fixing (small) memory leak on daemon-shutdown with
+ SSL enabled. -CG/PG
+
Thu Aug 5 22:24:37 CEST 2010
Fixing timeout bug on systems that think it's still
1970 (can happen if system time not initialized). -CG
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
@@ -1938,6 +1938,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
#if HTTPS_SUPPORT
if (daemon->options & MHD_USE_SSL)
{
+ gnutls_priority_deinit (daemon->priority_cache);
if (daemon->x509_cred)
gnutls_certificate_free_credentials (daemon->x509_cred);
/* lock MHD_gnutls_global mutex since it uses reference counting */
diff --git a/src/examples/minimal_example.c b/src/examples/minimal_example.c
@@ -68,7 +68,9 @@ main (int argc, char *const *argv)
}
d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
atoi (argv[1]),
- NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_END);
+ NULL, NULL, &ahc_echo, PAGE,
+ MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 5,
+ MHD_OPTION_END);
if (d == NULL)
return 1;
(void) getc (stdin);