diff options
author | Christian Heimes <christian@cheimes.de> | 2013-11-23 20:01:40 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-11-23 20:01:40 (GMT) |
commit | b3d3ee4fef6d1beb547671d12c514c86657b9223 (patch) | |
tree | 718a832aba523c31b8145b542912fe956aa42270 | |
parent | d41c343f28bd7631cfa866f8276673ccafb71d57 (diff) | |
download | cpython-b3d3ee4fef6d1beb547671d12c514c86657b9223.zip cpython-b3d3ee4fef6d1beb547671d12c514c86657b9223.tar.gz cpython-b3d3ee4fef6d1beb547671d12c514c86657b9223.tar.bz2 |
Issue #17810: Add NULL check to save_frozenset
CID 1131949: Dereference null return value (NULL_RETURNS)
-rw-r--r-- | Modules/_pickle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index f9aa043..b63a7d9 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; |