Dan Kegel wrote:
On Fri, Oct 23, 2009 at 9:19 AM, Nikolay Sivov <[email protected]> wrote:
Looking at msvcrt.dll._fcvt leak reported in recent results it's not quite
clear for me how could this happen.
It uses heap block allocated as thread data and it should be freed on
DLL_THREAD_DETACH.

Really?  I don't see it being freed.  I see TlsFree being called, but
I don't see the storage being freed...
case DLL_THREAD_DETACH:
    /* Free TLS */
    tls = TlsGetValue(msvcrt_tls_index);
    if (tls)
    {
    HeapFree(GetProcessHeap(),0,tls->efcvt_buffer); <=
    HeapFree(GetProcessHeap(),0,tls->asctime_buffer);
    HeapFree(GetProcessHeap(),0,tls->wasctime_buffer);
    HeapFree(GetProcessHeap(),0,tls->strerror_buffer);
    }
    HeapFree(GetProcessHeap(), 0, tls);
Did I miss something?



Reply via email to