diff --git a/Python/import.c b/Python/import.c index b79c048fa38..37e3f4b5984 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3255,6 +3255,7 @@ NullImporter_init(NullImporter *self, PyObject *args, PyObject *kwds) * "e:\\shared\\" and "\\\\whiterab-c2znlh\\shared" as dirs. */ rv = GetFileAttributesA(path); + PyMem_Free(path); if (rv != INVALID_FILE_ATTRIBUTES) { /* it exists */ if (rv & FILE_ATTRIBUTE_DIRECTORY) {