aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-07 22:41:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-07 23:04:23 +0200
commit31eaecfee9d84381945f3d5201775b9b00161d7a (patch)
tree1324ab185a1fbbcff810789972b2663d19b5b826 /libavformat
parent12b59e57f3d7a37ef7b29d8a1df5eb886b00b4ba (diff)
downloadffmpeg-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.c9
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;
}