diff options
author | Georg Brandl <georg@python.org> | 2005-09-25 06:16:40 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2005-09-25 06:16:40 (GMT) |
commit | e9f8ec98d4cd4542b5d6c5870d56a1ce1ae5d03b (patch) | |
tree | eaa72a6671896baa6187fc235eba876be72ad810 | |
parent | ec862b907aff99a4f256b946764f349f4d1d0c5c (diff) | |
download | cpython-e9f8ec98d4cd4542b5d6c5870d56a1ce1ae5d03b.zip cpython-e9f8ec98d4cd4542b5d6c5870d56a1ce1ae5d03b.tar.gz cpython-e9f8ec98d4cd4542b5d6c5870d56a1ce1ae5d03b.tar.bz2 |
Commit memory leaking fix.
-rw-r--r-- | Modules/posixmodule.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 183e02a..6f77159 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7255,8 +7255,12 @@ win32_startfile(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS rc = ShellExecute((HWND)0, NULL, filepath, NULL, NULL, SW_SHOWNORMAL); Py_END_ALLOW_THREADS - if (rc <= (HINSTANCE)32) - return win32_error("startfile", filepath); + if (rc <= (HINSTANCE)32) { + PyObject *errval = win32_error("startfile", filepath); + PyMem_Free(filepath); + return errval; + } + PyMem_Free(filepath); Py_INCREF(Py_None); return Py_None; } |