[vlc-commits] sftp: invalid free()
Rémi Denis-Courmont
git at videolan.org
Sat Apr 13 17:28:16 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 13 18:28:08 2013 +0300| [1188fc4e19835fdc87e682a0144e0136a35e7337] | committer: Rémi Denis-Courmont
sftp: invalid free()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1188fc4e19835fdc87e682a0144e0136a35e7337
---
modules/access/sftp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 2872963..6f1e8e4 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -172,9 +172,11 @@ static int Open( vlc_object_t* p_this )
char *psz_home = config_GetUserDir( VLC_HOME_DIR );
char *psz_knownhosts_file;
if( asprintf( &psz_knownhosts_file, "%s/.ssh/known_hosts", psz_home ) != -1 )
+ {
libssh2_knownhost_readfile( ssh_knownhosts, psz_knownhosts_file,
LIBSSH2_KNOWNHOST_FILE_OPENSSH );
- free( psz_knownhosts_file );
+ free( psz_knownhosts_file );
+ }
free( psz_home );
const char *fingerprint = libssh2_session_hostkey( p_sys->ssh_session, &i_len, &i_type );
More information about the vlc-commits
mailing list