]> git.sesse.net Git - ffmpeg/commitdiff
avformat/dashdec: Fix leak of representation languages
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 19 Sep 2020 05:01:30 +0000 (07:01 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 21 Sep 2020 02:32:03 +0000 (04:32 +0200)
These languages are normally freed after having been added as metadata
to their respective AVStreams. Yet if one never reaches said point, they
leak. This can happen as a result of an error when reading the header or
as a result of refreshing the manifests.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/dashdec.c

index ca2c2b5fd2698a86272d28c7d4b664c68f67fad1..4d4611ef0499cd94ef9897a563a2b1dcf1258833 100644 (file)
@@ -359,6 +359,7 @@ static void free_representation(struct representation *pls)
     }
 
     av_freep(&pls->url_template);
+    av_freep(&pls->lang);
     av_freep(&pls);
 }