[vlc-commits] demux: adaptative: fix memory leak

Hannes Domani git at videolan.org
Fri Feb 26 17:33:30 CET 2016


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Tue Feb 23 20:13:51 2016 +0100| [d3eccdb08c4e2a6e3201219dbab8841bb3436224] | committer: Jean-Baptiste Kempf

demux: adaptative: fix memory leak

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3eccdb08c4e2a6e3201219dbab8841bb3436224
---

 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



More information about the vlc-commits mailing list