-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
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
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error