[FFmpeg-cvslog] avformat/mov: free HEIFItem.name when cleaning items in mov_read_trak

James Almer git at videolan.org
Tue Mar 26 15:44:31 EET 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Mar 26 10:43:45 2024 -0300| [1e7ba76562949d526613a07257ee4c015cf71a14] | committer: James Almer

avformat/mov: free HEIFItem.name when cleaning items in mov_read_trak

Fixes memleaks.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e7ba76562949d526613a07257ee4c015cf71a14
---

 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 4e265cf662..a4d95a4b23 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4866,6 +4866,8 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         for (int i = c->nb_heif_item - 1; i >= 0; i--) {
             HEIFItem *item = &c->heif_item[i];
 
+            av_freep(&item->name);
+
             if (!item->st)
                 continue;
 



More information about the ffmpeg-cvslog mailing list