mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 11:10:58 +08:00
Fix connection leak
This commit is contained in:
@ -640,8 +640,9 @@ _mysql_ConnectionObject_close(
|
||||
_mysql_ConnectionObject *self,
|
||||
PyObject *args)
|
||||
{
|
||||
if (!args) return NULL;
|
||||
if (!PyArg_ParseTuple(args, "")) return NULL;
|
||||
if (args) {
|
||||
if (!PyArg_ParseTuple(args, "")) return NULL;
|
||||
}
|
||||
if (self->open) {
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
mysql_close(&(self->connection));
|
||||
|
Reference in New Issue
Block a user