mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
Reset error message at PQreset()
If you call PQreset() repeatedly, and the connection cannot be re-established, the error messages from the failed connection attempts kept accumulating in the error string. Fixes bug #11455 reported by Caleb Epstein. Backpatch to all supported versions.
This commit is contained in:
parent
604d94d4ca
commit
1a27fbd075
@ -2944,6 +2944,7 @@ closePGconn(PGconn *conn)
|
||||
* absent */
|
||||
conn->asyncStatus = PGASYNC_IDLE;
|
||||
pqClearAsyncResult(conn); /* deallocate result */
|
||||
resetPQExpBuffer(&conn->errorMessage);
|
||||
pg_freeaddrinfo_all(conn->addrlist_family, conn->addrlist);
|
||||
conn->addrlist = NULL;
|
||||
conn->addr_cur = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user