diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-07 22:41:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-07 23:04:23 +0200 |
commit | 31eaecfee9d84381945f3d5201775b9b00161d7a (patch) | |
tree | 1324ab185a1fbbcff810789972b2663d19b5b826 /libavformat | |
parent | 12b59e57f3d7a37ef7b29d8a1df5eb886b00b4ba (diff) | |
download | ffmpeg-31eaecfee9d84381945f3d5201775b9b00161d7a.tar.gz |
avformat/mpegtsenc: Free services array completely on failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegtsenc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 5ecc7fb447..4c5e289f1c 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -778,7 +778,6 @@ static int mpegts_write_header(AVFormatContext *s) return 0; fail: - av_free(service); av_free(pids); for (i = 0; i < s->nb_streams; i++) { st = s->streams[i]; @@ -792,6 +791,14 @@ fail: } av_freep(&st->priv_data); } + + for (i = 0; i < ts->nb_services; i++) { + service = ts->services[i]; + av_freep(&service->provider_name); + av_freep(&service->name); + av_free(service); + } + av_free(ts->services); return ret; } |