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;
|
return -1;
|
||||||
|
|
||||||
iter = PyObject_GetIter(obj);
|
iter = PyObject_GetIter(obj);
|
||||||
|
if (iter == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
for (;;) {
|
for (;;) {
|
||||||
PyObject *item;
|
PyObject *item;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user