From e736b1a40e1b3d9d27d535a34a0e6e018b1d591a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 15 Oct 2009 16:37:07 +0200 Subject: Fixed ssh_get_user_home_dir on Windows. --- libssh/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libssh/misc.c') diff --git a/libssh/misc.c b/libssh/misc.c index bae780b..4d15a51 100644 --- a/libssh/misc.c +++ b/libssh/misc.c @@ -75,8 +75,8 @@ char *ssh_get_user_home_dir(void) { char szPath = NULL; if (SHGetSpecialFolderPathA(NULL, tmp, CSIDL_PROFILE, TRUE)) { - szPath = malloc(strlen(szPath) + 1); - if (home == NULL) { + szPath = malloc(strlen(tmp) + 1); + if (szPath == NULL) { return NULL; } -- cgit