diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2012-03-05 02:09:20 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2012-03-05 02:09:20 +0000 |
commit | 8707d8c3991d2f6511876ce48089a46dd1f97ae7 (patch) | |
tree | 284842b0c345299bff5b5f4822bc0d9c814fbb1e | |
parent | 735d50c782b436d6807fd15e1b37e2231ce3e146 (diff) | |
download | psycopg2-8707d8c3991d2f6511876ce48089a46dd1f97ae7.tar.gz |
Fixed iterator refcount in case of memory error during COPY
-rw-r--r-- | psycopg/cursor_type.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index 533eb21..103c1db 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -1205,6 +1205,7 @@ static char *_psyco_curs_copy_columns(PyObject *columns) } if (NULL == (columnlist = PyMem_Malloc(bufsize))) { + Py_DECREF(coliter); PyErr_NoMemory(); goto error; } |