mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01:00
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 61461a300c. 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
This commit is contained in:
parent
12227a1d5f
commit
3497c87b05
|
|
@ -155,7 +155,7 @@ PQcancelCreate(PGconn *conn)
|
|||
return (PGcancelConn *) cancelConn;
|
||||
|
||||
oom_error:
|
||||
conn->status = CONNECTION_BAD;
|
||||
cancelConn->status = CONNECTION_BAD;
|
||||
libpq_append_conn_error(cancelConn, "out of memory");
|
||||
return (PGcancelConn *) cancelConn;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user