]> git.sesse.net Git - ffmpeg/commitdiff
avformat/dashdec: Reset pointer to NULL after freeing it
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 8 Oct 2020 13:40:02 +0000 (15:40 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 8 Oct 2020 13:40:02 +0000 (15:40 +0200)
This is currently safe here, because the effective lifetime of
adaptionset_lang is parse_manifest_adaptationset() (i.e. the pointer
gets overwritten each time on entry to the function and gets freed
before exiting the function), but it is nevertheless safer to reset the
pointer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/dashdec.c

index 42ea74635b457b5ea2b96bbcfe61f6e624509c31..c28bb07f448f8307a7f0c60b1d28390ccf546668 100644 (file)
@@ -1146,6 +1146,7 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
 
 err:
     xmlFree(c->adaptionset_lang);
+    c->adaptionset_lang = NULL;
     return ret;
 }