mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
avformat/matroskadec: free the packet on webvtt side data allocation failure
Fixes potential memory leaks Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
acdea9e7c5
commit
88eb368f42
@ -3121,6 +3121,7 @@ static int matroska_parse_webvtt(MatroskaDemuxContext *matroska,
|
||||
AV_PKT_DATA_WEBVTT_IDENTIFIER,
|
||||
id_len);
|
||||
if (!buf) {
|
||||
av_packet_unref(pkt);
|
||||
av_free(pkt);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
@ -3132,6 +3133,7 @@ static int matroska_parse_webvtt(MatroskaDemuxContext *matroska,
|
||||
AV_PKT_DATA_WEBVTT_SETTINGS,
|
||||
settings_len);
|
||||
if (!buf) {
|
||||
av_packet_unref(pkt);
|
||||
av_free(pkt);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user