Issue #19437: Fix parse_save_field() of the csv module, handle PyList_Append()
failure
This commit is contained in:
parent
1eadd6a120
commit
b80b378680
|
@ -546,7 +546,10 @@ parse_save_field(ReaderObj *self)
|
||||||
return -1;
|
return -1;
|
||||||
field = tmp;
|
field = tmp;
|
||||||
}
|
}
|
||||||
PyList_Append(self->fields, field);
|
if (PyList_Append(self->fields, field) < 0) {
|
||||||
|
Py_DECREF(field);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
Py_DECREF(field);
|
Py_DECREF(field);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue