libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Segfault after MHD_quiesce_daemon()


From: Markus Doppelbauer
Subject: Re: [libmicrohttpd] Segfault after MHD_quiesce_daemon()
Date: Fri, 17 Jul 2015 09:57:29 +0200

Sorry the NULL patch is the wrong fix - it makes it only more
unlikely to double-free() the pool. The scheduler could interrupt
right before "pos->pool = NULL".

Maybe the only solution is either to protect "MHD_cleanup_connections()"
with a mutex or to remove the call to "MHD_cleanup_connections()"
in "MHD_DAEMON_INFO_CURRENT_CONNECTIONS".

Thanks a lot
Markus



Am Donnerstag, den 16.07.2015, 22:13 +0200 schrieb Markus Doppelbauer:
Hello,

Maybe simply nullify "pos->pool" after MHD_pool_destroy()"?
Should avoid this double-free().

Or is there a chance to get the number of open connections
without calling "MHD_cleanup_connections()"?

Thanks a lot
Markus


            }
        }
        MHD_pool_destroy (pos->pool);
+       pos->pool = NULL;
  #if HTTPS_SUPPORT
        if (NULL != pos->tls_session)
        gnutls_deinit (pos->tls_session);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]