From: Christian Heimes Date: Sat, 23 Nov 2013 20:13:39 +0000 (+0100) Subject: Issue #17810: Add two missing error checks to save_global X-Git-Tag: v3.4.0b1~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8b1ba1699d429b1e80ea7d31032628d09c3e43e;p=thirdparty%2FPython%2Fcpython.git Issue #17810: Add two missing error checks to save_global CID 1131946: Unchecked return value (CHECKED_RETURN) --- diff --git a/Modules/_pickle.c b/Modules/_pickle.c index a1819b993d56..4e0d86c69ccd 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;