diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-07 22:40:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-07 23:02:10 +0200 |
commit | 12b59e57f3d7a37ef7b29d8a1df5eb886b00b4ba (patch) | |
tree | b2fce810a9889fbd459aa6c0ff2874a6c149dec6 | |
parent | 5f8300afc6537e2e06f8f90989d5f268884bb79c (diff) | |
download | ffmpeg-12b59e57f3d7a37ef7b29d8a1df5eb886b00b4ba.tar.gz |
avformat/mpegtsenc: Use correct deallocation code on failure of pids array allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mpegtsenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 5c0b0d761e..5ecc7fb447 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -623,8 +623,8 @@ static int mpegts_write_header(AVFormatContext *s) pids = av_malloc_array(s->nb_streams, sizeof(*pids)); if (!pids) { - av_free(service); - return AVERROR(ENOMEM); + ret = AVERROR(ENOMEM); + goto fail; } /* assign pids to each stream */ |