[vlc-commits] ntservice: Fix potential leak

Hugo Beauzée-Luyssen git at videolan.org
Tue Feb 14 15:30:39 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb 14 14:23:43 2017 +0100| [6ef981f7d7ef8fe81726b9eaf5069e77ede58e27] | committer: Hugo Beauzée-Luyssen

ntservice: Fix potential leak

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

 modules/control/ntservice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c
index 7872b71..a35d253 100644
--- a/modules/control/ntservice.c
+++ b/modules/control/ntservice.c
@@ -209,8 +209,8 @@ static int NTServiceInstall( intf_thread_t *p_intf )
     {
         strcat( psz_path, " " );
         strcat( psz_path, psz_extra );
-        free( psz_extra );
     }
+    free( psz_extra );
 
     SC_HANDLE service =
         CreateServiceA( handle, p_sys->psz_service, p_sys->psz_service,



More information about the vlc-commits mailing list