mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 21:00:33 +03:00
Fixed refcount problems in named callproc
This commit is contained in:
parent
d13521a6ce
commit
ffeb7001eb
|
@ -1080,6 +1080,7 @@ psyco_curs_callproc(cursorObject *self, PyObject *args)
|
||||||
|
|
||||||
if (!(scpnames[i] = psycopg_escape_identifier(
|
if (!(scpnames[i] = psycopg_escape_identifier(
|
||||||
self->conn, cpname, 0))) {
|
self->conn, cpname, 0))) {
|
||||||
|
Py_CLEAR(pname);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1131,12 +1132,12 @@ psyco_curs_callproc(cursorObject *self, PyObject *args)
|
||||||
self, operation, pvals, self->conn->async, 0)) {
|
self, operation, pvals, self->conn->async, 0)) {
|
||||||
/* The dict case is outside DBAPI scope anyway, so simply return None */
|
/* The dict case is outside DBAPI scope anyway, so simply return None */
|
||||||
if (using_dict) {
|
if (using_dict) {
|
||||||
Py_INCREF(Py_None);
|
|
||||||
res = Py_None;
|
res = Py_None;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
res = pvals;
|
res = pvals;
|
||||||
}
|
}
|
||||||
|
Py_INCREF(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user