Bug report
Bug description:
Hello,
Our internal coverity scan instance identified two code paths which leak a file descriptor in import.c in the _imp_create_dynamic_impl function:
If goto finally is reached fp will remain open.
There is also a related comment on the cleanup block:
https://github.com/python/cpython/blame/bef63d2fb81ae28760040157ea589541bed47d02/Python/import.c#L4849
CPython versions tested on:
3.15, 3.14, 3.13
Operating systems tested on:
Linux