upnp: Fix leak on error
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Thu, 3 Aug 2017 13:52:26 +0000 (15:52 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Thu, 3 Aug 2017 13:52:26 +0000 (15:52 +0200)
CID #1398416

modules/services_discovery/upnp.cpp

index b82956d..c21b2b1 100644 (file)
@@ -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;