Fix long-standing segfault when accept() or one of the calls made right
authorHeikki Linnakangas <[email protected]>
Wed, 27 Oct 2010 17:03:00 +0000 (20:03 +0300)
committerHeikki Linnakangas <[email protected]>
Wed, 27 Oct 2010 17:07:55 +0000 (20:07 +0300)
after accepting a connection fails, and the server is compiled with GSSAPI
support. Report and patch by Alexander V. Chernikov, bug #5731.

src/backend/postmaster/postmaster.c

index 435f03b80915230d66de9424a643e5e312a9ccbf..4e789311fee649aaca83558f4b1593ff0bf4a2ee 100644 (file)
@@ -1917,7 +1917,7 @@ ConnCreate(int serverFd)
                if (port->sock >= 0)
                        StreamClose(port->sock);
                ConnFree(port);
-               port = NULL;
+               return NULL;
        }
        else
        {