mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
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. Close GH-11403
This commit is contained in:
parent
7eb3e9cd17
commit
f194cdf852
3 changed files with 24 additions and 0 deletions
|
@ -172,6 +172,7 @@ static void pgsql_link_free(pgsql_link_handle *link)
|
|||
PQclear(res);
|
||||
}
|
||||
if (!link->persistent) {
|
||||
PQuntrace(link->conn);
|
||||
PQfinish(link->conn);
|
||||
}
|
||||
PGG(num_links)--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue