[vlc-devel] commit: sftp: fix a potential memleak. ( Rémi Duraffort )

git version control git at videolan.org
Thu Jan 21 19:11:32 CET 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jan 21 19:11:11 2010 +0100| [2c0fc58eacdf5509dc604b1330021dda101e1996] | committer: Rémi Duraffort 

sftp: fix a potential memleak.

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

 modules/access/sftp.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 8da5764..eaf3550 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -216,15 +216,11 @@ static int Open( vlc_object_t* p_this )
     vlc_UrlClean( &url );
     return VLC_SUCCESS;
 
-
 error:
     free( psz_password );
     free( psz_username );
-    if( p_sys )
-    {
-        vlc_UrlClean( &url );
-        free( p_sys );
-    }
+    vlc_UrlClean( &url );
+    free( p_sys );
     return VLC_EGENERIC;
 }
 




More information about the vlc-devel mailing list