aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-10-15 16:37:07 +0200
committerAndreas Schneider <mail@cynapses.org>2009-10-15 16:37:07 +0200
commite736b1a40e1b3d9d27d535a34a0e6e018b1d591a (patch)
tree1c040f9f37e808740f3568491f2c72c35ac90297
parentcbf012c33722737c255d08c7f81a3ee5c6c19052 (diff)
downloadlibssh-e736b1a40e1b3d9d27d535a34a0e6e018b1d591a.tar.gz
libssh-e736b1a40e1b3d9d27d535a34a0e6e018b1d591a.tar.xz
libssh-e736b1a40e1b3d9d27d535a34a0e6e018b1d591a.zip
Fixed ssh_get_user_home_dir on Windows.
-rw-r--r--libssh/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh/misc.c b/libssh/misc.c
index bae780b2..4d15a511 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;
}