diff options
author | Shehzad Salim <shehzadsalim@gmail.com> | 2009-08-12 13:25:37 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-08-12 13:25:37 +0000 |
commit | 51fdb6f08d3e18d052f2be630ad7ec160d4247ec (patch) | |
tree | 9472f9fae81f2819605ab5724bc27a222da60b0d /libavcodec | |
parent | c0b88f1920ce100e49ec2fdacff327e97a7b3c27 (diff) | |
download | ffmpeg-51fdb6f08d3e18d052f2be630ad7ec160d4247ec.tar.gz |
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)
Originally committed as revision 19633 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/w32thread.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/w32thread.c b/libavcodec/w32thread.c index da491c86f8..a88e3e0717 100644 --- a/libavcodec/w32thread.c +++ b/libavcodec/w32thread.c @@ -69,6 +69,7 @@ void avcodec_thread_free(AVCodecContext *s){ 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); |