summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-23 20:13:39 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-23 20:13:39 (GMT)
commite8b1ba1699d429b1e80ea7d31032628d09c3e43e (patch)
treefadff6adfff7bdb4fa7e38b3e453409229b72715 /Modules/_pickle.c
parent6188d09f1c27f0ba5d4c369677a308fe118e9d5a (diff)
downloadcpython-e8b1ba1699d429b1e80ea7d31032628d09c3e43e.zip
cpython-e8b1ba1699d429b1e80ea7d31032628d09c3e43e.tar.gz
cpython-e8b1ba1699d429b1e80ea7d31032628d09c3e43e.tar.bz2
Issue #17810: Add two missing error checks to save_global
CID 1131946: Unchecked return value (CHECKED_RETURN)
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index a1819b9..4e0d86c 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -3193,8 +3193,10 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
if (self->proto >= 4) {
const char stack_global_op = STACK_GLOBAL;
- save(self, module_name, 0);
- save(self, global_name, 0);
+ if (save(self, module_name, 0) < 0)
+ goto error;
+ if (save(self, global_name, 0) < 0)
+ goto error;
if (_Pickler_Write(self, &stack_global_op, 1) < 0)
goto error;