mirror of
https://github.com/postgres/postgres.git
synced 2025-08-15 14:02:29 +03:00
PyGreSQL causes a segfault when used with a Python executable that was
compiled with --with-pymalloc. This change fixes that. Thanks to Dave Wallace <dwallace@udel.edu>
This commit is contained in:
@@ -343,7 +343,7 @@ pgsource_dealloc(pgsourceobject * self)
|
|||||||
PQclear(self->last_result);
|
PQclear(self->last_result);
|
||||||
|
|
||||||
Py_XDECREF(self->pgcnx);
|
Py_XDECREF(self->pgcnx);
|
||||||
PyMem_DEL(self);
|
PyObject_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* closes object */
|
/* closes object */
|
||||||
@@ -990,7 +990,7 @@ pglarge_dealloc(pglargeobject * self)
|
|||||||
lo_close(self->pgcnx->cnx, self->lo_fd);
|
lo_close(self->pgcnx->cnx, self->lo_fd);
|
||||||
|
|
||||||
Py_XDECREF(self->pgcnx);
|
Py_XDECREF(self->pgcnx);
|
||||||
PyMem_DEL(self);
|
PyObject_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* opens large object */
|
/* opens large object */
|
||||||
@@ -1546,7 +1546,7 @@ pg_dealloc(pgobject * self)
|
|||||||
if (self->cnx)
|
if (self->cnx)
|
||||||
PQfinish(self->cnx);
|
PQfinish(self->cnx);
|
||||||
|
|
||||||
PyMem_DEL(self);
|
PyObject_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* close without deleting */
|
/* close without deleting */
|
||||||
@@ -1579,7 +1579,7 @@ pgquery_dealloc(pgqueryobject * self)
|
|||||||
if (self->last_result)
|
if (self->last_result)
|
||||||
PQclear(self->last_result);
|
PQclear(self->last_result);
|
||||||
|
|
||||||
PyMem_DEL(self);
|
PyObject_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* resets connection */
|
/* resets connection */
|
||||||
|
Reference in New Issue
Block a user