[vlc-commits] ftp: memory leak

Rémi Denis-Courmont git at videolan.org
Tue Aug 21 22:29:40 CEST 2012


vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 21 23:29:00 2012 +0300| [3ae9d98932a785974621dca1245f191bd0a79705] | committer: Rémi Denis-Courmont

ftp: memory leak

(not cherry-picked from commit 2b9e7ac1...)

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

 modules/access/ftp.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index ba16ea9..d76ba19 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -639,8 +639,10 @@ static int ftp_SendCommand( vlc_object_t *p_access, access_sys_t *p_sys,
     if( net_Printf( p_access, p_sys->fd_cmd, NULL, "%s\r\n", psz_cmd ) < 0 )
     {
         msg_Err( p_access, "failed to send command" );
+        free( psz_cmd );
         return VLC_EGENERIC;
     }
+    free( psz_cmd );
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list