forked from FFmpeg/FFmpeg
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:
parent
567e78b283
commit
0e9956a06e
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue