From: Christian Heimes Date: Sat, 23 Nov 2013 20:01:40 +0000 (+0100) Subject: Issue #17810: Add NULL check to save_frozenset X-Git-Tag: v3.4.0b1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3d3ee4fef6d1beb547671d12c514c86657b9223;p=python Issue #17810: Add NULL check to save_frozenset CID 1131949: Dereference null return value (NULL_RETURNS) --- diff --git a/Modules/_pickle.c b/Modules/_pickle.c index f9aa043a42..b63a7d92c5 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -2940,6 +2940,9 @@ save_frozenset(PicklerObject *self, PyObject *obj) return -1; iter = PyObject_GetIter(obj); + if (iter == NULL) { + return NULL; + } for (;;) { PyObject *item;