[Python-checkins] python/dist/src/Modules posixmodule.c, 2.329.2.5, 2.329.2.6
birkenfeld@users.sourceforge.net
birkenfeld at users.sourceforge.net
Sun Sep 25 08:16:31 CEST 2005
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4077/Modules
Modified Files:
Tag: release24-maint
posixmodule.c
Log Message:
Commit memory leaking fix.
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.329.2.5
retrieving revision 2.329.2.6
diff -u -d -r2.329.2.5 -r2.329.2.6
--- posixmodule.c 19 Sep 2005 06:42:30 -0000 2.329.2.5
+++ posixmodule.c 25 Sep 2005 06:16:28 -0000 2.329.2.6
@@ -7189,8 +7189,12 @@
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;
}
More information about the Python-checkins
mailing list