1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

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; FrameData *fd;
pkt->opaque_ref = av_buffer_allocz(sizeof(*fd)); pkt->opaque_ref = av_buffer_allocz(sizeof(*fd));
if (!pkt->opaque_ref) if (!pkt->opaque_ref) {
return AVERROR(ENOMEM); ret = AVERROR(ENOMEM);
goto end;
}
fd = (FrameData*)pkt->opaque_ref->data; fd = (FrameData*)pkt->opaque_ref->data;
fd->pkt_pos = pkt->pos; fd->pkt_pos = pkt->pos;
fd->pkt_size = pkt->size; fd->pkt_size = pkt->size;