Fix connection leak

This commit is contained in:
adustman
2005-02-04 17:03:46 +00:00
parent 6729b187d2
commit ba4cea7fdf

View File

@ -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));