summaryrefslogtreecommitdiffstats
path: root/libhb/hb.c
diff options
context:
space:
mode:
authorsaintdev <[email protected]>2007-03-31 06:55:02 +0000
committersaintdev <[email protected]>2007-03-31 06:55:02 +0000
commit2338338511e4b1ef3ec5e85606900a846efa2b42 (patch)
treec33957efc6c20bd8a2cab6c30bbb689b3e5b88fd /libhb/hb.c
parent18cd105e9a40beccc264178dba69b8b89926a121 (diff)
Fix about 156,199 bytes of leaked memory.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@469 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb.c')
-rw-r--r--libhb/hb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index c1748e8b5..d1eac132f 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -556,6 +556,7 @@ void hb_add( hb_handle_t * h, hb_job_t * job )
/* Copy the job */
job_copy = calloc( sizeof( hb_job_t ), 1 );
memcpy( job_copy, job, sizeof( hb_job_t ) );
+ title_copy->job = job_copy;
job_copy->title = title_copy;
job_copy->file = strdup( job->file );
job_copy->h = h;
@@ -680,6 +681,7 @@ void hb_close( hb_handle_t ** _h )
while( ( title = hb_list_item( h->list_title, 0 ) ) )
{
hb_list_rem( h->list_title, title );
+ free( title->job );
hb_title_close( &title );
}
hb_list_close( &h->list_title );