[vlc-commits] chromecast: fix leak when the stream is not supported

Thomas Guillem git at videolan.org
Fri Dec 15 17:37:22 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec 15 17:36:50 2017 +0100| [c682ebc079dd0e6c8c2347b8e7212497d39f9b66] | committer: Thomas Guillem

chromecast: fix leak when the stream is not supported

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

 modules/stream_out/chromecast/cast.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index c746781e5f..aef9b380e9 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -243,6 +243,8 @@ bool sout_stream_sys_t::startSoutChain( sout_stream_t *p_stream )
         if ( p_sys_id->p_sub_id == NULL )
         {
             msg_Err( p_stream, "can't handle %4.4s stream", (char *)&p_sys_id->fmt.i_codec );
+            es_format_Clean( &p_sys_id->fmt );
+            free( p_sys_id );
             it = streams.erase( it );
         }
         else



More information about the vlc-commits mailing list