[vlc-commits] sftp: do not close(-1)

Rémi Denis-Courmont git at videolan.org
Fri Aug 21 19:14:25 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Aug 21 19:51:41 2015 +0300| [5a13c1fec1d8350d17b0d7999516383ab2a68238] | committer: Rémi Denis-Courmont

sftp: do not close(-1)

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

 modules/access/sftp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index b4c281a..e308a18 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -331,7 +331,8 @@ error:
     free( psz_username );
     free( psz_remote_home );
     vlc_UrlClean( &url );
-    net_Close( p_sys->i_socket );
+    if( p_sys->i_socket >= 0 )
+        net_Close( p_sys->i_socket );
     free( p_sys );
     return VLC_EGENERIC;
 }



More information about the vlc-commits mailing list