nnorwitz at users.sourceforge.net writes: > Update of /cvsroot/python/python/dist/src/Modules > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16270/Modules > > Modified Files: > posixmodule.c > Log Message: > Plug a few memory leaks in utime(). path is allocated from within > PyArg_ParseTuple() since the format is "et" This change should > be reviewed carefully. I believe 'path' must be set to NULL at the start of the posix_utime function - I had a crash in a debug build on windows when running lib\test\test_unicode_file.py. Thomas Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.319 diff -c -r2.319 posixmodule.c *** posixmodule.c 6 Jun 2004 20:40:27 -0000 2.319 --- posixmodule.c 8 Jun 2004 10:35:03 -0000 *************** *** 1994,2000 **** static PyObject * posix_utime(PyObject *self, PyObject *args) { ! char *path; long atime, mtime, ausec, musec; int res; PyObject* arg; --- 1994,2000 ---- static PyObject * posix_utime(PyObject *self, PyObject *args) { ! char *path = NULL; long atime, mtime, ausec, musec; int res; PyObject* arg;
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4