Message ID | 20220826025016.29627-2-lq@chinaffmpeg.org |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/2] avformat/imfdec: check track valid before use it | expand |
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; }
fix CID: 1512404 When there have no val value should not xmlFree it. Signed-off-by: Steven Liu <lq@chinaffmpeg.org> --- libavformat/dashdec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)