mirror of
https://github.com/python/cpython.git
synced 2025-11-04 03:44:55 +00:00
Issue #17810: Add two missing error checks to save_global
CID 1131946: Unchecked return value (CHECKED_RETURN)
This commit is contained in:
parent
6188d09f1c
commit
e8b1ba1699
1 changed files with 4 additions and 2 deletions
|
|
@ -3193,8 +3193,10 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
|
||||||
if (self->proto >= 4) {
|
if (self->proto >= 4) {
|
||||||
const char stack_global_op = STACK_GLOBAL;
|
const char stack_global_op = STACK_GLOBAL;
|
||||||
|
|
||||||
save(self, module_name, 0);
|
if (save(self, module_name, 0) < 0)
|
||||||
save(self, global_name, 0);
|
goto error;
|
||||||
|
if (save(self, global_name, 0) < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
if (_Pickler_Write(self, &stack_global_op, 1) < 0)
|
if (_Pickler_Write(self, &stack_global_op, 1) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue