Mercurial > libavcodec.hg
changeset 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 | 5d5562aa94df |
children | d35904b4fe3f |
files | w32thread.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
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);