summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <ts.santos@sisa.samsung.com>2014-05-13 10:24:51 -0300
committerThiago Santos <ts.santos@sisa.samsung.com>2014-05-13 10:45:29 -0300
commit288e8d5c0ed21e11f5aa8e0dcb50f1f1ac584108 (patch)
tree5aaf467b7b0279da2022081dc11c81d09b565420
parent64bea0252b28743e7fb99add3de9a7ceaf3df15d (diff)
downloadgstreamer-plugins-bad-288e8d5c0ed21e11f5aa8e0dcb50f1f1ac584108.tar.gz
dashdemux: mpdparser: avoid double free of segment timeline node
The parsing function already frees the old value (if any), avoid a double free by not freeing it before calling the function without setting the pointer to NULL Coverity ID: 1212178
-rw-r--r--ext/dash/gstmpdparser.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index cc13ce980..a6f12f108 100644
--- a/ext/dash/gstmpdparser.c
+++ b/ext/dash/gstmpdparser.c
@@ -1357,10 +1357,7 @@ gst_mpdparser_parse_mult_seg_base_type_ext (GstMultSegmentBaseType ** pointer,
for (cur_node = a_node->children; cur_node; cur_node = cur_node->next) {
if (cur_node->type == XML_ELEMENT_NODE) {
if (xmlStrcmp (cur_node->name, (xmlChar *) "SegmentTimeline") == 0) {
- if (mult_seg_base_type->SegmentTimeline) {
- gst_mpdparser_free_segment_timeline_node
- (mult_seg_base_type->SegmentTimeline);
- }
+ /* parse frees the segmenttimeline if any */
gst_mpdparser_parse_segment_timeline_node
(&mult_seg_base_type->SegmentTimeline, cur_node);
} else if (xmlStrcmp (cur_node->name,