[vlc-devel] [PATCH 1/4] demux: adaptative: fix memory leak

Hannes Domani ssbssa at yahoo.de
Tue Feb 23 20:13:51 CET 2016


---
 modules/demux/adaptive/playlist/BasePeriod.cpp         | 2 --
 modules/demux/adaptive/playlist/SegmentInformation.cpp | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/playlist/BasePeriod.cpp b/modules/demux/adaptive/playlist/BasePeriod.cpp
index 434bb4a..5d2e986 100644
--- a/modules/demux/adaptive/playlist/BasePeriod.cpp
+++ b/modules/demux/adaptive/playlist/BasePeriod.cpp
@@ -40,14 +40,12 @@ BasePeriod::BasePeriod(AbstractPlaylist *playlist_) :
 {
     duration.Set(0);
     startTime.Set(0);
-    baseUrl.Set(NULL);
     playlist = playlist_;
 }
 
 BasePeriod::~BasePeriod ()
 {
     vlc_delete_all( adaptationSets );
-    delete baseUrl.Get();
     childs.clear();
 }
 
diff --git a/modules/demux/adaptive/playlist/SegmentInformation.cpp b/modules/demux/adaptive/playlist/SegmentInformation.cpp
index 212b647..f59c819 100644
--- a/modules/demux/adaptive/playlist/SegmentInformation.cpp
+++ b/modules/demux/adaptive/playlist/SegmentInformation.cpp
@@ -62,6 +62,7 @@ SegmentInformation::~SegmentInformation()
     delete segmentBase;
     delete segmentList;
     delete mediaSegmentTemplate;
+    delete baseUrl.Get();
 }
 
 AbstractPlaylist * SegmentInformation::getPlaylist() const
-- 
2.7.0



More information about the vlc-devel mailing list