Content-Length: 259302 | pFad | http://github.com/postgrespro/postgres/commit/3497c87b05a6ba31e8d760591900d550b2ef98bc

27 Fix copy-paste mistake in PQcancelCreate · postgrespro/postgres@3497c87 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/3497c87b05a6ba31e8d760591900d550b2ef98bc

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy