[Python-3000-checkins] r56958 - python/branches/py3k/Modules/posixmodule.c
neal.norwitz
python-3000-checkins at python.org
Sun Aug 12 18:56:02 CEST 2007
Author: neal.norwitz
Date: Sun Aug 12 18:56:02 2007
New Revision: 56958
Modified:
python/branches/py3k/Modules/posixmodule.c
Log:
Fix memory leak
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Sun Aug 12 18:56:02 2007
@@ -4304,8 +4304,9 @@
n = readlink(path, buf, (int) sizeof buf);
Py_END_ALLOW_THREADS
if (n < 0)
- return posix_error_with_filename(path);
+ return posix_error_with_allocated_filename(path);
+ PyMem_Free(path);
v = PyString_FromStringAndSize(buf, n);
if (arg_is_unicode) {
PyObject *w;
More information about the Python-3000-checkins
mailing list