X Tutup
Skip to content

Commit 01ca7aa

Browse files
author
neal.norwitz
committed
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. git-svn-id: http://svn.python.org/projects/python/trunk@42179 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent c0cad79 commit 01ca7aa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Mac/Modules/file/filesupport.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,10 @@ def getargsCheck(self, name):
302302
char *path = NULL;
303303
if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
304304
return 0;
305-
if ( (err=FSPathMakeRef(path, fsr, NULL)) ) {
305+
if ( (err=FSPathMakeRef(path, fsr, NULL)) )
306306
PyMac_Error(err);
307-
return 0;
308-
}
309-
return 1;
307+
PyMem_Free(path);
308+
return !err;
310309
}
311310
/* XXXX Should try unicode here too */
312311
/* Otherwise we try to go via an FSSpec */

0 commit comments

Comments
 (0)
X Tutup