summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c
index 37e3f4b..d741aca 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 *