From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 17 May 2022 01:57:42 +0000 (-0700) Subject: Fix NULL test in _testinternalcapi (GH-92861) X-Git-Tag: v3.11.0b2~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=386583040d3e6b9c44ef6d8f6da61c31c37c7b9e;p=thirdparty%2FPython%2Fcpython.git Fix NULL test in _testinternalcapi (GH-92861) (cherry picked from commit 702e0da000bf28aa20cb7f3893b575d977506495) Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> --- diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index 914b20b36f14..238de749fffc 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);