Fix NULL test in _testinternalcapi (GH-92861)

This commit is contained in:
Dennis Sweeney 2022-05-16 21:32:48 -04:00 committed by GitHub
parent bd30461298
commit 702e0da000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,7 @@ check_edit_cost(const char *a, const char *b, Py_ssize_t expected)
goto exit;
}
b_obj = PyUnicode_FromString(b);
if (a_obj == NULL) {
if (b_obj == NULL) {
goto exit;
}
Py_ssize_t result = _Py_UTF8_Edit_Cost(a_obj, b_obj, -1);