]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
r66862 contained memory leak.
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 9 Oct 2008 10:11:21 +0000 (10:11 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 9 Oct 2008 10:11:21 +0000 (10:11 +0000)
Modules/posixmodule.c

index 6e4925b5f5729a4be3c013ba0180ea9353186f65..4c580c46afcd9866dea985bb67e296b4ed538020 100644 (file)
@@ -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)