r66862 contained memory leak.

This commit is contained in:
Hirokazu Yamamoto 2008-10-09 10:11:21 +00:00
parent 10a018c285
commit 6c75a30712
1 changed files with 3 additions and 1 deletions

View File

@ -732,9 +732,11 @@ win32_wchdir(LPCWSTR path)
return FALSE;
}
result = GetCurrentDirectoryW(result, new_path);
if (!result)
if (!result) {
free(new_path);
return FALSE;
}
}
if (wcsncmp(new_path, L"\\\\", 2) == 0 ||
wcsncmp(new_path, L"//", 2) == 0)
/* UNC path, nothing to do. */