1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/mov: free AVBPrint on error when parsing infe boxes

Should fix memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-08-01 16:45:50 -03:00
parent 44864dbbb9
commit 11a5333980

View File

@ -8928,11 +8928,13 @@ static int mov_read_infe(MOVContext *c, AVIOContext *pb, MOVAtom atom)
continue;
break;
}
if (!item)
if (!item) {
av_bprint_finalize(&item_name, NULL);
return AVERROR(ENOMEM);
}
if (ret)
av_bprint_finalize(&item_name, &item->name);
av_assert1(ret);
av_bprint_finalize(&item_name, &item->name);
item->item_id = item_id;
item->type = item_type;