Skip to content

Commit 861c336

Browse files
committed
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>
1 parent f1f2228 commit 861c336

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/interfaces/python/pgmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ pgsource_dealloc(pgsourceobject * self)
343343
PQclear(self->last_result);
344344

345345
Py_XDECREF(self->pgcnx);
346-
PyMem_DEL(self);
346+
PyObject_DEL(self);
347347
}
348348

349349
/* closes object */
@@ -990,7 +990,7 @@ pglarge_dealloc(pglargeobject * self)
990990
lo_close(self->pgcnx->cnx, self->lo_fd);
991991

992992
Py_XDECREF(self->pgcnx);
993-
PyMem_DEL(self);
993+
PyObject_DEL(self);
994994
}
995995

996996
/* opens large object */
@@ -1546,7 +1546,7 @@ pg_dealloc(pgobject * self)
15461546
if (self->cnx)
15471547
PQfinish(self->cnx);
15481548

1549-
PyMem_DEL(self);
1549+
PyObject_DEL(self);
15501550
}
15511551

15521552
/* close without deleting */
@@ -1579,7 +1579,7 @@ pgquery_dealloc(pgqueryobject * self)
15791579
if (self->last_result)
15801580
PQclear(self->last_result);
15811581

1582-
PyMem_DEL(self);
1582+
PyObject_DEL(self);
15831583
}
15841584

15851585
/* resets connection */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy