bpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486) (GH-26496)

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.
(cherry picked from commit bdb56902a3)

Co-authored-by: stratakis <cstratak@redhat.com>
This commit is contained in:
Miss Islington (bot) 2021-06-02 16:50:55 -07:00 committed by GitHub
parent 9a68862497
commit 85b587a38d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {