[vlc-commits] demux: smooth: fix memleak (cid #1346971)
Francois Cartegnie
git at videolan.org
Thu Dec 31 15:29:44 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 31 14:28:08 2015 +0100| [306544c892bdb0479070e6e1795c812a2be10e34] | committer: Francois Cartegnie
demux: smooth: fix memleak (cid #1346971)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=306544c892bdb0479070e6e1795c812a2be10e34
---
modules/demux/smooth/mp4/IndexReader.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/smooth/mp4/IndexReader.cpp b/modules/demux/smooth/mp4/IndexReader.cpp
index 163da26..e57ab97 100644
--- a/modules/demux/smooth/mp4/IndexReader.cpp
+++ b/modules/demux/smooth/mp4/IndexReader.cpp
@@ -53,8 +53,11 @@ bool IndexReader::parseIndex(block_t *p_block, BaseRepresentation *rep)
uuid_box = uuid_box->p_next;
}
+ if(!uuid_box)
+ return false;
+
SegmentTimeline *timelineadd = new (std::nothrow) SegmentTimeline(rep->inheritTimescale());
- if (uuid_box && timelineadd)
+ if (timelineadd)
{
const MP4_Box_data_tfrf_t *p_tfrfdata = uuid_box->data.p_tfrf;
for ( uint8_t i=0; i<p_tfrfdata->i_fragment_count; i++ )
More information about the vlc-commits
mailing list