Skip to content

Commit ad465aa

Browse files
Merge branch 'gh-143547-unraisablehook-uaf'
2 parents a9ca49d + a2e23bc commit ad465aa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_json.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,12 @@ raise_errmsg(const char *msg, PyObject *s, Py_ssize_t end)
423423

424424
PyObject *exc;
425425
exc = PyObject_CallFunction(JSONDecodeError, "zOn", msg, s, end);
426-
Py_DECREF(JSONDecodeError);
427426
if (exc) {
428427
PyErr_SetObject(JSONDecodeError, exc);
429428
Py_DECREF(exc);
430429
}
430+
431+
Py_DECREF(JSONDecodeError);
431432
}
432433

433434
static void

0 commit comments

Comments
 (0)