fftools/ffprobe: Fix memleak

Fixes Coverity issue #1524491.
Regression since e6126abc69.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-07-31 11:32:18 +02:00
parent 567e78b283
commit 0e9956a06e

View File

@ -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;