Commit b68cd421 authored by Guido van Rossum's avatar Guido van Rossum

Fix two smal memory leaks discovered by Vadim Chugunov.

parent f811dcab
......@@ -779,7 +779,6 @@ load_package(name, pathname)
if (fp != NULL)
fclose(fp);
cleanup:
Py_XINCREF(m);
Py_XDECREF(path);
Py_XDECREF(file);
return m;
......@@ -1712,8 +1711,8 @@ import_submodule(mod, subname, fullname)
}
buf[0] = '\0';
fdp = find_module(subname, path,
buf, MAXPATHLEN+1, &fp);
fdp = find_module(subname, path, buf, MAXPATHLEN+1, &fp);
Py_XDECREF(path);
if (fdp == NULL) {
if (!PyErr_ExceptionMatches(PyExc_ImportError))
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment