Commit 043d17af authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Jean-Baptiste Kempf

sftp: close sockets

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 063838110416e60e0a8dec864c58c3b896d8c352)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9c3f5568
......@@ -107,6 +107,7 @@ static int Open( vlc_object_t* p_this )
return VLC_EGENERIC;
STANDARD_BLOCK_ACCESS_INIT;
p_sys->i_socket = -1;
/* Parse the URL */
const char* path = p_access->psz_location;
......@@ -251,6 +252,7 @@ error:
free( psz_password );
free( psz_username );
vlc_UrlClean( &url );
net_Close( p_sys->i_socket );
free( p_sys );
return VLC_EGENERIC;
}
......@@ -266,6 +268,7 @@ static void Close( vlc_object_t* p_this )
libssh2_sftp_shutdown( p_sys->sftp_session );
libssh2_session_free( p_sys->ssh_session );
net_Close( p_sys->i_socket );
free( p_sys );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment