mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-10 16:22:33 +03:00
Fixed iterator refcount in case of memory error during COPY
This commit is contained in:
parent
735d50c782
commit
8707d8c399
|
@ -1205,6 +1205,7 @@ static char *_psyco_curs_copy_columns(PyObject *columns)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL == (columnlist = PyMem_Malloc(bufsize))) {
|
if (NULL == (columnlist = PyMem_Malloc(bufsize))) {
|
||||||
|
Py_DECREF(coliter);
|
||||||
PyErr_NoMemory();
|
PyErr_NoMemory();
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user