fftools/ffprobe: Fix memleak
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | Mon Jul 31 11:32:18 2023 +0200| [0e9956a06e9307e01232bc354665fadf6f7a09df] | committer: Andreas Rheinhardt 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>
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e9956a06e9307e012...
fftools/ffprobe.c | 6 ++++-- 1 file 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;
participants (1)
-
Andreas Rheinhardt