diff mbox series

[FFmpeg-devel,14/21] avformat/dashdec: Fix leak of representation languages

Message ID 20200919163610.1099233-14-andreas.rheinhardt@gmail.com
State Accepted
Commit f1c3c173c9408085d7b26f3bdd264b426bca314a
Headers show
Series [FFmpeg-devel,01/21] avformat/dashdec: Avoid double free on error | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 19, 2020, 4:36 p.m. UTC
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.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/dashdec.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index ca2c2b5fd2..4d4611ef04 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -359,6 +359,7 @@  static void free_representation(struct representation *pls)
     }
 
     av_freep(&pls->url_template);
+    av_freep(&pls->lang);
     av_freep(&pls);
 }