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