diff options
author | James Almer <jamrial@gmail.com> | 2016-12-08 01:21:11 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-12-08 01:21:11 -0300 |
commit | 8396d54d3c627006b4131df8c1656f1762313886 (patch) | |
tree | bad78e3f71d5dd9262ae5bceb2e50cc625635cbb | |
parent | 3ab1311aba74a28cebfc22985cd9250fda93e6cf (diff) | |
download | ffmpeg-8396d54d3c627006b4131df8c1656f1762313886.tar.gz |
avformat/matroskadec: fix memleak on stream side data failure
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index f4a452ef0a..efacca9c01 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1931,8 +1931,10 @@ static int mkv_parse_video_projection(AVStream *st, const MatroskaTrack *track) ret = av_stream_add_side_data(st, AV_PKT_DATA_SPHERICAL, (uint8_t *)spherical, spherical_size); - if (ret < 0) + if (ret < 0) { + av_freep(&spherical); return ret; + } return 0; } |