Skip to content

Commit 69c5d43

Browse files
committed
ext/pgsql: fix PGtrace invalid free issue.
disable trace when closing the connection, is a no op if there is no stream attached to it.
1 parent 06d6873 commit 69c5d43

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/pgsql/pgsql.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ static void pgsql_link_free(pgsql_link_handle *link)
172172
PQclear(res);
173173
}
174174
if (!link->persistent) {
175+
PQuntrace(link->conn);
175176
PQfinish(link->conn);
176177
}
177178
PGG(num_links)--;

0 commit comments

Comments
 (0)