summaryrefslogtreecommitdiff
path: root/libavformat/mpegtsenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-07 22:40:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-07 23:02:10 +0200
commit12b59e57f3d7a37ef7b29d8a1df5eb886b00b4ba (patch)
treeb2fce810a9889fbd459aa6c0ff2874a6c149dec6 /libavformat/mpegtsenc.c
parent5f8300afc6537e2e06f8f90989d5f268884bb79c (diff)
avformat/mpegtsenc: Use correct deallocation code on failure of pids array allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r--libavformat/mpegtsenc.c4
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 */