diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-31 19:16:58 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-31 19:19:57 -0300 |
commit | aba24b51cc1b045a9810458b4bb15fee2c182948 (patch) | |
tree | c9a9ea707bfe19e5b04ac1eb4657c4117b7983af /src | |
parent | a6d3dea8e5e0c8a0df2f95d66b6c3903a4354ca0 (diff) | |
download | postgresql-aba24b51cc1b045a9810458b4bb15fee2c182948.tar.gz postgresql-aba24b51cc1b045a9810458b4bb15fee2c182948.zip |
Initialize conn->Pfdebug to NULL when creating a connection
Failing to do this can cause a crash, and I suspect is what has happened
with a buildfarm member reporting mysterious failures.
This is an ancient bug, but I'm not backpatching since evidently nobody
cares about PQtrace in older releases.
Discussion: https://postgr.es/m/3333908.1617227066@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index a90bdb8ab6d..56a8266bc3f 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -3952,6 +3952,7 @@ makeEmptyPGconn(void) conn->verbosity = PQERRORS_DEFAULT; conn->show_context = PQSHOW_CONTEXT_ERRORS; conn->sock = PGINVALID_SOCKET; + conn->Pfdebug = NULL; /* * We try to send at least 8K at a time, which is the usual size of pipe |