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

Thomas Guillem git at videolan.org
Fri Dec 15 17:44:26 CET 2017


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

chromecast: fix leak when the stream is not supported

(cherry picked from commit c682ebc079dd0e6c8c2347b8e7212497d39f9b66)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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