aboutsummaryrefslogtreecommitdiffstats
path: root/libdash/source
diff options
context:
space:
mode:
Diffstat (limited to 'libdash/source')
-rw-r--r--libdash/source/mpd/MPD.cpp3
-rw-r--r--libdash/source/xml/DOMParser.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/libdash/source/mpd/MPD.cpp b/libdash/source/mpd/MPD.cpp
index 0c4f2f3a..8563ef07 100644
--- a/libdash/source/mpd/MPD.cpp
+++ b/libdash/source/mpd/MPD.cpp
@@ -27,6 +27,7 @@ MPD::MPD () :
maxSegmentDuration(""),
maxSubsegmentDuration("")
{
+ this->mpdPathBaseUrl = NULL;
}
MPD::~MPD ()
{
@@ -38,6 +39,8 @@ MPD::~MPD ()
delete(this->periods.at(i));
for(size_t i = 0; i < this->baseUrls.size(); i++)
delete(this->baseUrls.at(i));
+ if (this->mpdPathBaseUrl)
+ delete(this->mpdPathBaseUrl);
}
const std::vector<IProgramInformation *>& MPD::GetProgramInformations () const
diff --git a/libdash/source/xml/DOMParser.cpp b/libdash/source/xml/DOMParser.cpp
index 5feb3850..c4fd2fb2 100644
--- a/libdash/source/xml/DOMParser.cpp
+++ b/libdash/source/xml/DOMParser.cpp
@@ -41,11 +41,11 @@ bool DOMParser::Parse (std::string path)
if(xmlTextReaderRead(this->reader))
this->root = this->ProcessNode(path);
+ xmlFreeTextReader(this->reader);
+
if(this->root == NULL)
return false;
- xmlFreeTextReader(this->reader);
-
return true;
}
Node* DOMParser::ProcessNode (std::string path)
@@ -110,6 +110,7 @@ Node* DOMParser::ProcessNode (std::string path)
Node *node = new Node();
node->SetType(type);
node->SetText(text);
+ delete text;
return node;
}
}