[vlc-commits] mux: mp4: fix leaks on failed allocs (cid #1313792, #1313791, #1313790)
Francois Cartegnie
git at videolan.org
Fri Jan 1 18:17:55 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 1 17:34:33 2016 +0100| [6f78ecc71cb6ada9f09fcf67fb9e0f1ca7865ebf] | committer: Francois Cartegnie
mux: mp4: fix leaks on failed allocs (cid #1313792, #1313791, #1313790)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f78ecc71cb6ada9f09fcf67fb9e0f1ca7865ebf
---
modules/mux/mp4/libmp4mux.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index c566c10..f7e940f 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -1192,6 +1192,7 @@ static bo_t *GetStblBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
{
bo_free(stsd);
bo_free(stco);
+ bo_free(stsc);
return NULL;
}
bo_add_32be(stts, 0); // entry-count (fixed latter)
@@ -1299,6 +1300,7 @@ static bo_t *GetStblBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
bo_free(stts);
bo_free(stsz);
bo_free(stss);
+ bo_free(ctts);
return NULL;
}
box_gather(stbl, stsd);
@@ -1689,7 +1691,7 @@ bo_t * GetMoovBox(vlc_object_t *p_obj, mp4mux_trackinfo_t **pp_tracks, unsigned
/* append dinf to mdia */
box_gather(minf, dinf);
}
- else bo_free(dinf);
+ else bo_free(dref);
}
/* add stbl */
More information about the vlc-commits
mailing list