[openssl-users] Handle Leaks - shmem-win32.c shmem.c - OpenSSL 1.0.1l

Michel SALES michel.sales at OnLine.fr
Sun Jan 25 18:49:21 UTC 2015

Hi Avery,

> In the code I sent over before, I was calling CloseHandle on the thread:
> HANDLE h1=CreateThread(0,0,thread1,0,0,&t1);  if(h1==0) { return
0; } CloseHandle(h1);

Yes, but you were trying to close the handle of a thread which was still
running !
I have not checked what happens in this case.

I am not sure to fully understand what your are doing now, but with the
modified version I've sent to you, _CrtDumpMemoryLeaks() doesn't report any
problem on my Windows 7 64 bits machine.

Just another quick idea : why not try _beginthread() instead of
CreateThread() ?


More information about the openssl-users mailing list