mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #5041: Fixed memory leak.
This commit is contained in:
parent
5276c6417d
commit
90eaaf623a
1 changed files with 4 additions and 2 deletions
|
@ -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 *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue