projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffa6f3d
)
This should fix a mem leak on the Mac. Brett tested it.
author
Neal Norwitz
<nnorwitz@gmail.com>
Mon, 23 Jan 2006 07:25:29 +0000
(07:25 +0000)
committer
Neal Norwitz
<nnorwitz@gmail.com>
Mon, 23 Jan 2006 07:25:29 +0000
(07:25 +0000)
Mac/Modules/file/_Filemodule.c
patch
|
blob
|
history
diff --git
a/Mac/Modules/file/_Filemodule.c
b/Mac/Modules/file/_Filemodule.c
index 36ef03ce9cb59f987d79516ebf7acc48ca5d8e65..81f0c02ee0cdd24efbbc4027ad1100d7680e1b71 100644
(file)
--- a/
Mac/Modules/file/_Filemodule.c
+++ b/
Mac/Modules/file/_Filemodule.c
@@
-3204,11
+3204,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 */