[Python-checkins] cpython: Issue #17810: Add two missing error checks to save_global
christian.heimes
python-checkins at python.org
Sat Nov 23 21:14:13 CET 2013
http://hg.python.org/cpython/rev/a02adfb3260a
changeset: 87450:a02adfb3260a
parent: 87447:3c222d1f81e9
user: Christian Heimes <christian at cheimes.de>
date: Sat Nov 23 21:13:39 2013 +0100
summary:
Issue #17810: Add two missing error checks to save_global
CID 1131946: Unchecked return value (CHECKED_RETURN)
files:
Modules/_pickle.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -3193,8 +3193,10 @@
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;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list