Commit f04790a4 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Fixed possible reference leaks in the _json module.

parent 2f7d13c6
......@@ -2077,8 +2077,11 @@ encoder_listencode_obj(PyEncoderObject *s, PyObject *rval, PyObject *obj, Py_ssi
return -1;
}
if (Py_EnterRecursiveCall(" while encoding a JSON object"))
if (Py_EnterRecursiveCall(" while encoding a JSON object")) {
Py_DECREF(newobj);
Py_XDECREF(ident);
return -1;
}
rv = encoder_listencode_obj(s, rval, newobj, indent_level);
Py_LeaveRecursiveCall();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment