Skip to content

Commit

Permalink
Fix NULL test in _testinternalcapi (GH-92861)
Browse files Browse the repository at this point in the history
(cherry picked from commit 702e0da)

Co-authored-by: Dennis Sweeney <[email protected]>
  • Loading branch information
miss-islington and sweeneyde authored May 17, 2022
1 parent da2f0c7 commit 3865830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_testinternalcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3865830

Please sign in to comment.