summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-01-30 11:05:53 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-01-30 11:05:53 (GMT)
commitbbb3781ed5f6df99aa99ddcf1844ca9455048f00 (patch)
tree419cae878bd7a98f4c96992647beb439d34c8303 /Python
parent948e705a213a277a9803ea4ba7402408a7452e1e (diff)
downloadcpython-bbb3781ed5f6df99aa99ddcf1844ca9455048f00.zip
cpython-bbb3781ed5f6df99aa99ddcf1844ca9455048f00.tar.gz
cpython-bbb3781ed5f6df99aa99ddcf1844ca9455048f00.tar.bz2
Merged revisions 69117 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r69117 | hirokazu.yamamoto | 2009-01-30 12:15:05 +0900 | 1 line Issue #5041: Fixed memory leak. ........
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c
index 80eb04b..a2e0f26 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -2894,12 +2894,14 @@ static PyObject *
imp_find_module(PyObject *self, PyObject *args)
{
char *name;
- PyObject *path = NULL;
+ PyObject *ret, *path = NULL;
if (!PyArg_ParseTuple(args, "es|O:find_module",
Py_FileSystemDefaultEncoding, &name,
&path))
return NULL;
- return call_find_module(name, path);
+ ret = call_find_module(name, path);
+ PyMem_Free(name);
+ return ret;
}
static PyObject *