On Fri, Jun 30, 2000, [EMAIL PROTECTED] wrote:

> [...]
> When modssl is built as a shared object and apache is sent a SIGHUP or a SIGUSR1
> signal, modssl leaks memory when it unloads and reloads.
> 
> In ssl_engine_init.c, I've taken a stab at cleaning up some of the memory leaks.
>  Given that openssl has static variables which contain one time initializations,
> I'm not sure what the real solution is.  Is the intention to build modssl as a
> static object to avoid these signal related restart memory leaks?

Yes, OpenSSL requires more cleanup to avoid its static stuff.
Building mod_ssl as a static module doesn't solve the problem.

>     // Cleanup openssl as much as possible
>     ERR_remove_state(0);
>     EVP_cleanup();
>     OBJ_NAME_cleanup(-1);
>     ERR_free_strings();
>     if(ERR_get_err_state_table() != NULL)
>     {
>         lh_free(ERR_get_err_state_table());
>     }

OBJ_NAME_cleanup and the lh_free(ERR_get_err_state_table());
are already implicitly done with the first ERR_/EVP_ calls.
I've added those now to mod_ssl, too. Thanks for the hint.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to