Skip to content

Commit b500563

Browse files
gh-143544: Fix reference lifetime in raise_errmsg
1 parent 39767c6 commit b500563

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Modules/_json.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,7 @@ raise_errmsg(const char *msg, PyObject *s, Py_ssize_t end)
417417
_Py_DECLARE_STR(json_decoder, "json.decoder");
418418

419419
PyObject *JSONDecodeError =
420-
PyImport_ImportModuleAttr(&_Py_STR(json_decoder),
421-
&_Py_ID(JSONDecodeError));
420+
PyImport_ImportModuleAttr(&_Py_STR(json_decoder), &_Py_ID(JSONDecodeError));
422421
if (JSONDecodeError == NULL) {
423422
return;
424423
}

0 commit comments

Comments
 (0)