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>
pull/390/head
Andreas Rheinhardt 1 year ago
parent 567e78b283
commit 0e9956a06e
  1. 6
      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;

Loading…
Cancel
Save