commit | fca70054c5704535f38dd780821bb1482c01eb1e | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Sun Aug 12 16:56:02 2007 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Sun Aug 12 16:56:02 2007 +0000 |
tree | 6f2a987b9f7908a6e4a4298400f2aa14b3bd1c28 | |
parent | 72937f3216b8d771d305be0ed65b12e458f5f685 [diff] |
Fix memory leak
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 @@ 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;