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
a00d468e65
commit
8f8314b560
@ -2895,6 +2895,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