New submission from Charalampos Stratakis <cstra...@redhat.com>:
This is an issue as it seems with coverity as it's an error case where the file was not actually opened. This warning can be silenced and the code be made more explicit by adding an assertion. Python-3.9.1/Modules/getpath.c:1264: alloc_arg: "calculate_open_pyenv" allocates memory that is stored into "env_file". Python-3.9.1/Modules/getpath.c:1266: leaked_storage: Variable "env_file" going out of scope leaks the storage it points to. # 1264| status = calculate_open_pyenv(calculate, &env_file); # 1265| if (_PyStatus_EXCEPTION(status)) { # 1266|-> return status; # 1267| } # 1268| if (env_file == NULL) { ---------- messages: 394906 nosy: cstratak priority: normal severity: normal status: open title: Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file". versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44285> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com