summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-10-09 10:11:21 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-10-09 10:11:21 (GMT)
commit6c75a30712cb5f00d77582edddc24d0a9850d0a0 (patch)
tree30f4e1728b8e29fec0c866083978c21ed712e46d
parent10a018c285219b42d8a1cc972acf9e440a979106 (diff)
downloadcpython-6c75a30712cb5f00d77582edddc24d0a9850d0a0.zip
cpython-6c75a30712cb5f00d77582edddc24d0a9850d0a0.tar.gz
cpython-6c75a30712cb5f00d77582edddc24d0a9850d0a0.tar.bz2
r66862 contained memory leak.
-rw-r--r--Modules/posixmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 6e4925b..4c580c4 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)