[vlc-commits] upnp: fix leak in error path

Thomas Guillem git at videolan.org
Mon Feb 8 16:02:56 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb  8 14:51:48 2016 +0100| [272a3f39509c492c838fb51087bb255b7a2cd421] | committer: Thomas Guillem

upnp: fix leak in error path

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

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

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 99988dd..9062e0e 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -213,6 +213,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->p_server_list = new(std::nothrow) SD::MediaServerList( p_sd );
     if ( unlikely( p_sys->p_server_list == NULL ) )
     {
+        free(p_sys);
         return VLC_ENOMEM;
     }
 



More information about the vlc-commits mailing list