diff options
author | jstebbins <[email protected]> | 2014-09-05 23:51:00 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-09-05 23:51:00 +0000 |
commit | 40eb8ca79c9af3748c86f908f3da1bff7231a459 (patch) | |
tree | 951b3737f37a45208e3fedd3b3a4e10e32e58cd7 /libhb | |
parent | 3bc51b0b0a02bda3346277ee3f26a96e6089ee19 (diff) |
libhb: plug memory leaks
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6394 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/decavcodec.c | 3 | ||||
-rw-r--r-- | libhb/muxavformat.c | 1 | ||||
-rw-r--r-- | libhb/muxcommon.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index c10a599a6..129b43f2f 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -700,6 +700,7 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, dec_len = avcodec_decode_audio4(context, frame, &got_frame, &avp); if (dec_len < 0) { + av_frame_free(&frame); break; } if (dec_len > 0 && got_frame) @@ -774,9 +775,11 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, } ret = 1; + av_frame_free(&frame); break; } dec_pos += dec_len; + av_frame_free(&frame); } parse_pos += parse_len; } diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index 34e76fd46..8186c5bd2 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -1314,6 +1314,7 @@ static int avformatEnd(hb_mux_object_t *m) av_write_trailer(m->oc); avio_close(m->oc->pb); avformat_free_context(m->oc); + free(m->tracks); m->oc = NULL; return 0; diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index a555f95c4..a4c3c9cc8 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -538,6 +538,7 @@ void muxClose( hb_work_object_t * w ) } free( track ); } + free(mux->track); hb_unlock( mux->mutex ); hb_lock_close( &mux->mutex ); hb_bitvec_free(&mux->eof); |