From 6c75a30712cb5f00d77582edddc24d0a9850d0a0 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Thu, 9 Oct 2008 10:11:21 +0000 Subject: [PATCH] r66862 contained memory leak. --- Modules/posixmodule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 6e4925b5f5..4c580c46af 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -732,8 +732,10 @@ 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) -- 2.50.1