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;
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to