mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 02:54:29 +08:00
6
_mysql.c
6
_mysql.c
@ -2212,12 +2212,10 @@ static void
|
|||||||
_mysql_ConnectionObject_dealloc(
|
_mysql_ConnectionObject_dealloc(
|
||||||
_mysql_ConnectionObject *self)
|
_mysql_ConnectionObject *self)
|
||||||
{
|
{
|
||||||
PyObject *o;
|
|
||||||
|
|
||||||
PyObject_GC_UnTrack(self);
|
PyObject_GC_UnTrack(self);
|
||||||
if (self->open) {
|
if (self->open) {
|
||||||
o = _mysql_ConnectionObject_close(self, NULL);
|
mysql_close(&(self->connection));
|
||||||
Py_XDECREF(o);
|
self->open = 0;
|
||||||
}
|
}
|
||||||
MyFree(self);
|
MyFree(self);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user