From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 43332440DE for ; Fri, 26 Aug 2022 02:54:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B084868B9E8; Fri, 26 Aug 2022 05:53:49 +0300 (EEST) Received: from bg5.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C46D68B5CD for ; Fri, 26 Aug 2022 05:53:43 +0300 (EEST) X-QQ-mid: bizesmtp76t1661482224twlmysc9 Received: from localhost ( [103.107.217.224]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 26 Aug 2022 10:50:23 +0800 (CST) X-QQ-SSF: 01100000000000Z0Z000000A0000000 X-QQ-FEAT: fwplPe5ckNLs3ezkha91xUoSD+lWBqIt1kAnwa98XMxx1nRxuyELC2gkSJxPa 7SyjJavIThNExgPlW4PJI+z6jkB0t542bWAzRInj78bofhAZ/XYachQ5pQsbOki27ACOneT QU007hdbURGhnVR1jFLPBtS8Eh2jz+Bii7yfH0QPNFme5sN0uHpTAjwpAWtQ+VVvESwNc2L L5eBlGyRQR4n4UCqZrDTGhZI4O4RIRncBK94Uu59pUq+GZroUHeuRNgpoIuQAsO3A8e8sTb csn6KBjYVORX/iAVJJzgb8uVNKsb4VmDcY9NF2YfLykQL1yO1XCy/RY7omP7nwhDNTr9Xht b5JbCWZ4AETOk24bkfPMGC5nIpjLBeSqF0sql9k X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Aug 2022 10:50:16 +0800 Message-Id: <20220826025016.29627-2-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20220826025016.29627-1-lq@chinaffmpeg.org> References: <20220826025016.29627-1-lq@chinaffmpeg.org> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybglogicsvr:qybglogicsvr2 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/dashdec: check val before xmlFree it X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Steven Liu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: fix CID: 1512404 When there have no val value should not xmlFree it. Signed-off-by: Steven Liu --- 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-request@ffmpeg.org with subject "unsubscribe".