mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
mwh pointed out _Filemodule.c is generated. So to fix the memory leak
this file (the source) must be fixed. Why isn't there a comment at the top saying the file is generated and why are both the source and generated file checked in? Bootstrap problem? Will backport.
This commit is contained in:
parent
62a21121b4
commit
73afe9aa32
1 changed files with 3 additions and 4 deletions
|
@ -302,11 +302,10 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr)
|
|||
char *path = NULL;
|
||||
if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
|
||||
return 0;
|
||||
if ( (err=FSPathMakeRef(path, fsr, NULL)) ) {
|
||||
if ( (err=FSPathMakeRef(path, fsr, NULL)) )
|
||||
PyMac_Error(err);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
PyMem_Free(path);
|
||||
return !err;
|
||||
}
|
||||
/* XXXX Should try unicode here too */
|
||||
/* Otherwise we try to go via an FSSpec */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue