summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>2022-05-17 01:32:48 (GMT)
committerGitHub <noreply@github.com>2022-05-17 01:32:48 (GMT)
commit702e0da000bf28aa20cb7f3893b575d977506495 (patch)
treedb1c54179ff5930920cdb7d4aae25aac5fd340fa /Modules
parentbd304612980edd16c568ea8a5b30795f048bbf24 (diff)
downloadcpython-702e0da000bf28aa20cb7f3893b575d977506495.zip
cpython-702e0da000bf28aa20cb7f3893b575d977506495.tar.gz
cpython-702e0da000bf28aa20cb7f3893b575d977506495.tar.bz2
Fix NULL test in _testinternalcapi (GH-92861)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testinternalcapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c
index 914b20b..238de74 100644
--- a/Modules/_testinternalcapi.c
+++ b/Modules/_testinternalcapi.c
@@ -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);