diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-07-31 11:32:18 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-08-01 16:31:13 +0200 |
commit | 0e9956a06e9307e01232bc354665fadf6f7a09df (patch) | |
tree | 62b023f574110b8ba787dc5f33eb4baf9d71f380 /fftools | |
parent | 567e78b28320939c18e16acbdbeb2b77d24e2c03 (diff) | |
download | ffmpeg-0e9956a06e9307e01232bc354665fadf6f7a09df.tar.gz |
fftools/ffprobe: Fix memleak
Fixes Coverity issue #1524491.
Regression since e6126abc6997058ca49ee596b70611bbe367163e.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffprobe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 81610c097b..5c2d4cbff1 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2929,8 +2929,10 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile, FrameData *fd; pkt->opaque_ref = av_buffer_allocz(sizeof(*fd)); - if (!pkt->opaque_ref) - return AVERROR(ENOMEM); + if (!pkt->opaque_ref) { + ret = AVERROR(ENOMEM); + goto end; + } fd = (FrameData*)pkt->opaque_ref->data; fd->pkt_pos = pkt->pos; fd->pkt_size = pkt->size; |