diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-23 07:37:28 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-23 07:37:28 (GMT) |
commit | c280d940347b32c97dda77329c5acaca827206a5 (patch) | |
tree | 93b49baf5ad6826736be29f6ed92670ed5d7733f | |
parent | 1eb6bb635a8fae1260bdf0558eeea84d9531eb60 (diff) | |
download | cpython-c280d940347b32c97dda77329c5acaca827206a5.zip cpython-c280d940347b32c97dda77329c5acaca827206a5.tar.gz cpython-c280d940347b32c97dda77329c5acaca827206a5.tar.bz2 |
Backport: This should fix a mem leak on the Mac. Brett tested it.
-rw-r--r-- | Mac/Modules/file/_Filemodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c index c1b4310..7fb1364 100644 --- a/Mac/Modules/file/_Filemodule.c +++ b/Mac/Modules/file/_Filemodule.c @@ -3202,9 +3202,9 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr) return 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 */ |