diff options
author | jstebbins <[email protected]> | 2009-12-08 23:48:54 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-12-08 23:48:54 +0000 |
commit | d0d9e2e2c6365b7f4c0a68cb70f5117d40ba2962 (patch) | |
tree | 5a5bf6e69da432057a2f4fc14aa25eeba4631e38 /libhb/work.c | |
parent | 550206d2774f6c4f9c76252a6ae986cd6269ca46 (diff) |
fix buffer leak during indepth scan
and fix a couple potential leaks if the timing is just right in work loops
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3016 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libhb/work.c b/libhb/work.c index ba4ea956e..f4be983e3 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -922,7 +922,13 @@ static void do_job( hb_job_t * job, int cpu_count ) if ( buf_in == NULL ) continue; if ( *job->die ) + { + if( buf_in ) + { + hb_buffer_close( &buf_in ); + } break; + } w->status = w->work( w, &buf_in, &buf_out ); @@ -1120,7 +1126,13 @@ static void work_loop( void * _w ) if ( buf_in == NULL ) continue; if ( *w->done ) + { + if( buf_in ) + { + hb_buffer_close( &buf_in ); + } break; + } w->status = w->work( w, &buf_in, &buf_out ); |