Commit 8ebf9106 authored by Victor Stinner's avatar Victor Stinner

(Merge 3.4) Issue #22338: Fix a crash in the json module on memory allocation

failure.
parents eeca5f82 31a3ec31
No related merge requests found
......@@ -132,6 +132,8 @@ Core and Builtins
Library
-------
- Issue #22338: Fix a crash in the json module on memory allocation failure.
- Issue #12410: imaplib.IMAP4 now supports the context management protocol.
Original patch by Tarek Ziadé.
......
......@@ -287,7 +287,7 @@ _build_rval_index_tuple(PyObject *rval, Py_ssize_t idx) {
} \
} \
if (PyList_Append(chunks, chunk)) { \
Py_DECREF(chunk); \
Py_CLEAR(chunk); \
goto bail; \
} \
Py_CLEAR(chunk); \
......@@ -1555,6 +1555,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc,
if (item == NULL)
goto bail;
PyList_SET_ITEM(items, i, item);
item = NULL;
Py_DECREF(key);
}
}
......
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