diff options
author | jstebbins <[email protected]> | 2014-01-24 16:41:44 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-01-24 16:41:44 +0000 |
commit | 1cee701ce99fbd613b97c5f6e9822f9326991a56 (patch) | |
tree | e2e4ed278d599b997fd26047793ee814fd115d73 | |
parent | 1c5cdd2e5767b3b25df9da740034e1f05a43d271 (diff) |
libhb: fix double free in decavcodec during scan
decavcodecvFlush freed the context, then under certain error
conditions, closePriveData freed the context again.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5989 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/decavcodec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index ca33d4172..a0f5a59c4 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -428,7 +428,7 @@ static void closePrivData( hb_work_private_t ** ppv ) if ( pv->context ) { av_freep( &pv->context->extradata ); - av_free( pv->context ); + av_freep( &pv->context ); } if ( pv->list ) { @@ -704,7 +704,7 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, av_parser_close( parser ); hb_avcodec_close( context ); av_freep( &context->extradata ); - av_free( context ); + av_freep( &context ); return ret; } @@ -2022,7 +2022,7 @@ static void decavcodecvFlush( hb_work_object_t *w ) pv->video_codec_opened = 0; hb_avcodec_close( pv->context ); av_freep( &pv->context->extradata ); - av_free( pv->context ); + av_freep( &pv->context ); if ( pv->parser ) { av_parser_close(pv->parser); |