mirror of https://github.com/python/cpython
Issue #17810: Add NULL check to save_frozenset
CID 1131949: Dereference null return value (NULL_RETURNS)
This commit is contained in:
parent
d41c343f28
commit
b3d3ee4fef
|
@ -2940,6 +2940,9 @@ save_frozenset(PicklerObject *self, PyObject *obj)
|
|||
return -1;
|
||||
|
||||
iter = PyObject_GetIter(obj);
|
||||
if (iter == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
for (;;) {
|
||||
PyObject *item;
|
||||
|
||||
|
|
Loading…
Reference in New Issue