[vlc-commits] mux: mp4: fix leaks

Francois Cartegnie git at videolan.org
Tue Jan 16 00:06:09 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jan 15 23:54:00 2018 +0100| [9cef5b98a741c0f9d29cca7ef3490cfb1b658932] | committer: Francois Cartegnie

mux: mp4: fix leaks

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

 modules/mux/mp4/mp4.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/mux/mp4/mp4.c b/modules/mux/mp4/mp4.c
index 3d0d140c9c..e22963490a 100644
--- a/modules/mux/mp4/mp4.c
+++ b/modules/mux/mp4/mp4.c
@@ -357,8 +357,7 @@ cleanup:
         mp4mux_trackinfo_Clear(&p_stream->mux);
         free(p_stream);
     }
-    if (p_sys->i_nb_streams)
-        free(p_sys->pp_streams);
+    TAB_CLEAN(p_sys->i_nb_streams, p_sys->pp_streams);
     free(p_sys);
 }
 
@@ -1362,7 +1361,11 @@ static void CleanupFrag(sout_mux_sys_t *p_sys)
             p_stream->towrite.p_first = p_next;
         }
         free(p_stream->p_indexentries);
+
+        mp4mux_trackinfo_Clear(&p_stream->mux);
+        free(p_stream);
     }
+    TAB_CLEAN(p_sys->i_nb_streams, p_sys->pp_streams);
     free(p_sys);
 }
 



More information about the vlc-commits mailing list