[FFmpeg-devel] [PATCH] avutil/channel_layout: Fix leak of string

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Mar 15 16:55:35 EET 2022


Fixes memleaks in the channel_layout FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavutil/channel_layout.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index 05ed35c078..8cc4efe4cf 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -587,6 +587,7 @@ int av_channel_layout_from_string(AVChannelLayout *channel_layout,
             av_free(channel);
             av_free(chname);
         }
+        av_free(chlist);
 
         return 0;
     }
-- 
2.32.0



More information about the ffmpeg-devel mailing list