[4/6] wininet: Clean up locks after closing libssl and libcrypto.

Hans Leidekker hans at codeweavers.com
Sun Feb 7 09:46:58 CST 2010


On Sunday 07 February 2010 16:24:11 Paul Vriens wrote:

> >       if (OpenSSL_ssl_handle)
> > @@ -305,6 +297,12 @@ void NETCON_unload(void)
> >               pSSL_CTX_free(ctx);
> >           wine_dlclose(OpenSSL_ssl_handle, NULL, 0);
> >       }
> > +    if (ssl_locks)
> > +    {
> > +        int i;
> > +        for (i = 0; i<  pCRYPTO_num_locks(); i++) DeleteCriticalSection(&ssl_locks[i]);
> > +        HeapFree(GetProcessHeap(), 0, ssl_locks);
> > +    }
> >   #endif
> >   }
> >
> Hi Hans,
> 
> I was checking a crash in an installer (the AkamaiDownloadManager to 
> download CS4 for example) and it looks like we are accessing a ssl 
> function CRYPTO_num_locks() after we've closed the library?
> 
> Can you confirm this?

Yes, looks like I fixed this in winhttp but forgot to send the same patch for
wininet. Try this patch.

 -Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wininet_dont_call_libcrypto_function_after_closing_the_library.diff
Type: text/x-patch
Size: 1548 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20100207/ebf43c4a/attachment.bin>


More information about the wine-devel mailing list