Issue #17810: Add NULL check to save_frozenset

CID 1131949:  Dereference null return value  (NULL_RETURNS)
This commit is contained in:
Christian Heimes 2013-11-23 21:01:40 +01:00
parent d41c343f28
commit b3d3ee4fef
1 changed files with 3 additions and 0 deletions

View File

@ -2940,6 +2940,9 @@ save_frozenset(PicklerObject *self, PyObject *obj)
return -1;
iter = PyObject_GetIter(obj);
if (iter == NULL) {
return NULL;
}
for (;;) {
PyObject *item;