summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-03-17 02:14:18 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-03-17 02:25:45 +0000
commit963123812d320d7b9d039a63b23555a59b06af1f (patch)
treed7a3990b14514ca3b85ac1db6cb16426f7094a97
parent734845b79adc733bd9b7414602111824c55fdb2c (diff)
downloadpsycopg2-fix-856.tar.gz
Make sure to free the connection's pgres on deletefix-856
-rw-r--r--psycopg/connection_type.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/psycopg/connection_type.c b/psycopg/connection_type.c
index d4a969b..96e5647 100644
--- a/psycopg/connection_type.c
+++ b/psycopg/connection_type.c
@@ -1432,6 +1432,7 @@ connection_dealloc(PyObject* obj)
PyMem_Free(self->encoding);
if (self->critical) free(self->critical);
if (self->cancel) PQfreeCancel(self->cancel);
+ PQclear(self->pgres);
connection_clear(self);