mirror of https://github.com/python/cpython
bpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486)
This was flagged by a static analyzer, but the logic of why this is NULL on error is hard to follow for humans as well.
This commit is contained in:
parent
fbf25b8c0d
commit
bdb56902a3
|
@ -1263,6 +1263,7 @@ calculate_read_pyenv(PyCalculatePath *calculate)
|
|||
|
||||
status = calculate_open_pyenv(calculate, &env_file);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
assert(env_file == NULL);
|
||||
return status;
|
||||
}
|
||||
if (env_file == NULL) {
|
||||
|
|
Loading…
Reference in New Issue