From: Neal Norwitz Date: Mon, 23 Jan 2006 07:37:28 +0000 (+0000) Subject: Backport: This should fix a mem leak on the Mac. Brett tested it. X-Git-Tag: v2.4.3c1~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c280d940347b32c97dda77329c5acaca827206a5;p=thirdparty%2FPython%2Fcpython.git Backport: This should fix a mem leak on the Mac. Brett tested it. --- diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c index c1b4310e6e32..7fb1364ae4af 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 */