Mercurial > libavcodec.hg
diff w32thread.c @ 10044:560708e850a4 libavcodec
Fix a memleak with win32 threads: the handle returned by _beginthreadex
must be closed (this differs from _beginthread).
Patch by Shehzad Salim (shehzadsalim gmail com)
author | reimar |
---|---|
date | Wed, 12 Aug 2009 13:25:37 +0000 |
parents | a9734fe0811e |
children | 32ee88f14239 |
line wrap: on
line diff
--- a/w32thread.c Tue Aug 11 16:18:55 2009 +0000 +++ b/w32thread.c Wed Aug 12 13:25:37 2009 +0000 @@ -69,6 +69,7 @@ WaitForSingleObject(c[i].thread, INFINITE); if(c[i].work_sem) CloseHandle(c[i].work_sem); if(c[i].done_sem) CloseHandle(c[i].done_sem); + if(c[i].thread) CloseHandle(c[i].thread); } av_freep(&s->thread_opaque);