Skip to content

Commit 3497c87

Browse files
committed
Fix copy-paste mistake in PQcancelCreate
When an OOM occurred, this function was incorrectly setting a status of CONNECTION_BAD on the passed in PGconn instead of on the newly created PGcancelConn. Mistake introduced with 61461a3. Backpatch to 17. Author: Jelte Fennema-Nio <postgres@jeltef.nl> Reported-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/20240630190040.26.nmisch@google.com
1 parent 12227a1 commit 3497c87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interfaces/libpq/fe-cancel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ PQcancelCreate(PGconn *conn)
155155
return (PGcancelConn *) cancelConn;
156156

157157
oom_error:
158-
conn->status = CONNECTION_BAD;
158+
cancelConn->status = CONNECTION_BAD;
159159
libpq_append_conn_error(cancelConn, "out of memory");
160160
return (PGcancelConn *) cancelConn;
161161
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy