Skip to content

Commit

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

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
  • Loading branch information
sweeneyde authored and miss-islington committed May 17, 2022
1 parent 006b302 commit 0f9ad2a
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 @@ -292,7 +292,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 0f9ad2a

Please sign in to comment.