[vlc-commits] microdns: Fix memory leak

Hugo Beauzée-Luyssen git at videolan.org
Thu Feb 7 16:41:14 CET 2019


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

microdns: Fix memory leak

(cherry picked from commit dcb2cb4fbd5e1b37f9f19aaa2095d636167bc7f7)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 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 f367c20cc6..a77af219b1 100644
--- a/modules/services_discovery/microdns.c
+++ b/modules/services_discovery/microdns.c
@@ -366,6 +366,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