[vlc-commits] upnp: Fix leak

Hugo Beauzée-Luyssen git at videolan.org
Wed Jan 18 16:01:30 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jan 18 14:28:14 2017 +0100| [d9d4902ed7a87a74f0ee6fc2cd8bf97aa43b7ab7] | committer: Hugo Beauzée-Luyssen

upnp: Fix leak

Fix CID #1398416

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

 modules/services_discovery/upnp.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 68f5db6..a802eed 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -507,13 +507,12 @@ void MediaServerList::parseNewServer( IXML_Document *doc, const std::string &loc
                     p_server->isSatIp = true;
                     if ( !addServer( p_server ) )
                         delete p_server;
-
-                    free(psz_satip_channellist);
                 } else {
                     msg_Warn( m_sd, "SAT>IP server '%s' did not provide a playlist", url.psz_host);
                 }
 
                 /* to comply with the SAT>IP specifications, we don't fallback on another channel list if this path failed */
+                free(psz_satip_channellist);
                 vlc_UrlClean( &url );
                 continue;
             }



More information about the vlc-commits mailing list