[vlc-commits] microdns: Fix memory leak

Hugo Beauzée-Luyssen git at videolan.org
Wed Jan 30 16:56:10 CET 2019


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jan 30 16:51:37 2019 +0100| [dcb2cb4fbd5e1b37f9f19aaa2095d636167bc7f7] | committer: Hugo Beauzée-Luyssen

microdns: Fix memory leak

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

 modules/services_discovery/microdns.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/services_discovery/microdns.c b/modules/services_discovery/microdns.c
index db86e41ac9..ad0d2691f7 100644
--- a/modules/services_discovery/microdns.c
+++ b/modules/services_discovery/microdns.c
@@ -356,6 +356,8 @@ parse_entries( const struct rr_entry *p_entries, bool b_renderer,
     }
     if( psz_ip == NULL || i_nb_srv == 0 )
     {
+        for( unsigned int i = 0; i < i_nb_srv; ++i )
+            free( p_srvs[i].psz_device_name );
         free( p_srvs );
         return VLC_EGENERIC;
     }



More information about the vlc-commits mailing list