Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8f8314b

Browse filesBrowse files
committed
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.
1 parent a00d468 commit 8f8314b
Copy full SHA for 8f8314b

File tree

Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed

‎src/interfaces/libpq/fe-connect.c

Copy file name to clipboardExpand all lines: src/interfaces/libpq/fe-connect.c
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,6 +2895,7 @@ closePGconn(PGconn *conn)
28952895
* absent */
28962896
conn->asyncStatus = PGASYNC_IDLE;
28972897
pqClearAsyncResult(conn); /* deallocate result */
2898+
resetPQExpBuffer(&conn->errorMessage);
28982899
pg_freeaddrinfo_all(conn->addrlist_family, conn->addrlist);
28992900
conn->addrlist = NULL;
29002901
conn->addr_cur = NULL;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.