]> git.sesse.net Git - vlc/commitdiff
sftp: close sftp handle in error path
authorPetri Hintukainen <phintuka@gmail.com>
Thu, 12 Mar 2015 12:49:39 +0000 (14:49 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 12 Mar 2015 13:21:07 +0000 (14:21 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/access/sftp.c

index fe25f0583cd1d4faab4155996a5e6940a393a2b7..16159a88a12363ceac930079ff588b726df98bb9 100644 (file)
@@ -244,6 +244,8 @@ static int Open( vlc_object_t* p_this )
     return VLC_SUCCESS;
 
 error:
+    if( p_sys->file )
+        libssh2_sftp_close_handle( p_sys->file );
     if( p_sys->ssh_session )
         libssh2_session_free( p_sys->ssh_session );
     free( psz_password );