Fixed a segfault on Windows.

This commit is contained in:
Andreas Schneider
2009-10-29 12:10:22 +01:00
parent e455f6f756
commit 89f0311927

View File

@@ -72,7 +72,7 @@
#ifdef _WIN32
char *ssh_get_user_home_dir(void) {
char tmp[MAX_PATH] = {0};
char szPath = NULL;
char *szPath = NULL;
if (SHGetSpecialFolderPathA(NULL, tmp, CSIDL_PROFILE, TRUE)) {
szPath = malloc(strlen(tmp) + 1);