[vlc-commits] upnp: Fix leak on error

Hugo Beauzée-Luyssen git at videolan.org
Thu Aug 3 16:22:33 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Aug  3 15:52:26 2017 +0200| [0f78ca270fa03de85aa27ded1dfa907f04262053] | committer: Hugo Beauzée-Luyssen

upnp: Fix leak on error

CID #1398416

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

 modules/services_discovery/upnp.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index b82956d152..c21b2b1e37 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -502,7 +502,10 @@ void MediaServerList::parseNewServer( IXML_Document *doc, const std::string &loc
                     }
 
                     if ( unlikely( !p_server ) )
+                    {
+                        free( psz_satip_channellist );
                         break;
+                    }
 
                     p_server->satIpHost = url.psz_host;
                     p_server->isSatIp = true;



More information about the vlc-commits mailing list