[vlc-commits] cycle: fix double free

Rémi Denis-Courmont git at videolan.org
Mon Oct 12 17:02:59 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 11 21:14:52 2020 +0300| [c1c40b2ac6788c3e0e37333e3935ffd10711650f] | committer: Rémi Denis-Courmont

cycle: fix double free

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

 modules/stream_out/cycle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/cycle.c b/modules/stream_out/cycle.c
index 73b54f939f..6dd3caa22c 100644
--- a/modules/stream_out/cycle.c
+++ b/modules/stream_out/cycle.c
@@ -135,7 +135,7 @@ static void DelStream(sout_stream_t *stream)
         if (id->id != NULL)
             sout_StreamIdDel(sys->stream, id->id);
 
-    sout_StreamChainDelete(sys->stream, NULL);
+    sout_StreamChainDelete(sys->stream, stream->p_next);
     sys->stream = NULL;
 }
 
@@ -299,7 +299,7 @@ static void Close(vlc_object_t *obj)
     assert(vlc_list_is_empty(&sys->ids));
 
     if (sys->stream != NULL)
-        sout_StreamChainDelete(sys->stream, NULL);
+        sout_StreamChainDelete(sys->stream, stream->p_next);
 
     for (sout_cycle_t *cycle = sys->start, *next; cycle != NULL; cycle = next)
     {



More information about the vlc-commits mailing list