diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-12 16:56:02 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-12 16:56:02 (GMT) |
commit | fca70054c5704535f38dd780821bb1482c01eb1e (patch) | |
tree | 6f2a987b9f7908a6e4a4298400f2aa14b3bd1c28 /Modules | |
parent | 72937f3216b8d771d305be0ed65b12e458f5f685 (diff) | |
download | cpython-fca70054c5704535f38dd780821bb1482c01eb1e.zip cpython-fca70054c5704535f38dd780821bb1482c01eb1e.tar.gz cpython-fca70054c5704535f38dd780821bb1482c01eb1e.tar.bz2 |
Fix memory leak
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index d710a73..000f6a2 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -4304,8 +4304,9 @@ posix_readlink(PyObject *self, PyObject *args) 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; |