aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libssh/misc.c4
1 files changed, 2 insertions, 2 deletions
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;
}