mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue #19437: Fix parse_save_field() of the csv module, handle PyList_Append()
failure
This commit is contained in:
@@ -546,7 +546,10 @@ parse_save_field(ReaderObj *self)
|
||||
return -1;
|
||||
field = tmp;
|
||||
}
|
||||
PyList_Append(self->fields, field);
|
||||
if (PyList_Append(self->fields, field) < 0) {
|
||||
Py_DECREF(field);
|
||||
return -1;
|
||||
}
|
||||
Py_DECREF(field);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user