From: Damiano Galassi <damiog@gmail.com>
Date: Sat, 12 Nov 2016 12:22:09 +0000 (+0100)
Subject: libhb: do not free hb_work_private_t in reader_init() if the reader open fail, it... 
X-Git-Tag: 1.0.0~129
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17a0f5b08907134ee9fcc1c86ce3f900c30db8c2;p=handbrake

libhb: do not free hb_work_private_t in reader_init() if the reader open fail, it will be freed later in reader_close(). Fixes a crash that happens when hb_reader_open() fails because the source file was moved.
---

diff --git a/libhb/reader.c b/libhb/reader.c
index a0e9e9f5f..9b8b6084e 100644
--- a/libhb/reader.c
+++ b/libhb/reader.c
@@ -299,7 +299,6 @@ static int reader_init( hb_work_object_t * w, hb_job_t * job )
     // with the reader. Specifically avcodec needs this.
     if ( hb_reader_open( r ) )
     {
-        free( r );
         return 1;
     }
     return 0;