[vlc-commits] chromecast: descriptor leak

Rémi Denis-Courmont git at videolan.org
Fri Nov 14 16:32:03 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Nov 14 17:31:55 2014 +0200| [8a3c4f91d82dd4025a2e80717cc6d18a305f0617] | committer: Rémi Denis-Courmont

chromecast: descriptor leak

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

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

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 68e44da..af5cc3a 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -378,7 +378,10 @@ static int connectChromecast(sout_stream_t *p_stream, char *psz_ipChromecast)
 
     p_sys->p_creds = vlc_tls_ClientCreate(VLC_OBJECT(p_stream));
     if (p_sys->p_creds == NULL)
+    {
+        net_Close(fd);
         return -1;
+    }
 
     p_sys->p_tls = vlc_tls_ClientSessionCreate(p_sys->p_creds, fd, psz_ipChromecast,
                                                "tcps", NULL, NULL);



More information about the vlc-commits mailing list