]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: prevent usage of finished PGcancelConn
authorDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 5 Apr 2024 08:47:47 +0000 (10:47 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 5 Apr 2024 18:35:16 +0000 (18:35 +0000)
commitce02f59ca4058ef940dba8823525f0150d6dc2e5
treeac9539aa35c2c3748c5f424545d5e55a0b81dbc6
parent8af314fa9ed9496c6176300cc804e2b745085ff4
fix: prevent usage of finished PGcancelConn

Similarly to PGconn, PGcancelConn must not be used after .finish(); we
raise an OperationalError to prevent segfault when the connection
pointer is NULL.
psycopg/psycopg/pq/pq_ctypes.py
psycopg_c/psycopg_c/pq/pgcancel.pyx
tests/pq/test_pgconn.py