[FFmpeg-cvslog] avformat/matroskadec: fix memleak on stream side data failure
James Almer
git at videolan.org
Thu Dec 8 06:26:28 EET 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Dec 8 01:21:11 2016 -0300| [8396d54d3c627006b4131df8c1656f1762313886] | committer: James Almer
avformat/matroskadec: fix memleak on stream side data failure
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8396d54d3c627006b4131df8c1656f1762313886
---
libavformat/matroskadec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index f4a452e..efacca9 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;
}
More information about the ffmpeg-cvslog
mailing list