Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92af5d9

Browse files
author
Kristján Valur Jónsson
committed
Fix a leaking "pathname" in import.c
1 parent e1b0445 commit 92af5d9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/import.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,6 +3114,7 @@ imp_load_source(PyObject *self, PyObject *args)
31143114
return NULL;
31153115
}
31163116
m = load_source_module(name, pathname, fp);
3117+
PyMem_Free(pathname);
31173118
fclose(fp);
31183119
return m;
31193120
}

0 commit comments

Comments
 (0)