mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #22338: Fix a crash in the json module on memory allocation failure.
This commit is contained in:
parent
6d46dff5b5
commit
31a3ec313d
2 changed files with 4 additions and 1 deletions
|
@ -32,6 +32,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #22338: Fix a crash in the json module on memory allocation failure.
|
||||||
|
|
||||||
- Issue #22226: First letter no longer is stripped from the "status" key in
|
- Issue #22226: First letter no longer is stripped from the "status" key in
|
||||||
the result of Treeview.heading().
|
the result of Treeview.heading().
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ _build_rval_index_tuple(PyObject *rval, Py_ssize_t idx) {
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
if (PyList_Append(chunks, chunk)) { \
|
if (PyList_Append(chunks, chunk)) { \
|
||||||
Py_DECREF(chunk); \
|
Py_CLEAR(chunk); \
|
||||||
goto bail; \
|
goto bail; \
|
||||||
} \
|
} \
|
||||||
Py_CLEAR(chunk); \
|
Py_CLEAR(chunk); \
|
||||||
|
@ -1555,6 +1555,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc,
|
||||||
if (item == NULL)
|
if (item == NULL)
|
||||||
goto bail;
|
goto bail;
|
||||||
PyList_SET_ITEM(items, i, item);
|
PyList_SET_ITEM(items, i, item);
|
||||||
|
item = NULL;
|
||||||
Py_DECREF(key);
|
Py_DECREF(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue