fix CID: 1512404
When there have no val value should not xmlFree it.

Signed-off-by: Steven Liu <l...@chinaffmpeg.org>
---
 libavformat/dashdec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 63bf7e96a5..bf9adf2183 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1185,8 +1185,10 @@ static int parse_programinformation(AVFormatContext *s, 
xmlNodePtr node)
             }
         }
         node = xmlNextElementSibling(node);
-        xmlFree(val);
-        val = NULL;
+        if (val) {
+            xmlFree(val);
+            val = NULL;
+        }
     }
     return 0;
 }
-- 
2.25.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to