From: Heikki Linnakangas Date: Wed, 27 Oct 2010 17:03:00 +0000 (+0300) Subject: Fix long-standing segfault when accept() or one of the calls made right X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=61ba6f4bf01305e1acdff79424e6133cf2a0b46c;p=users%2Fc2main%2Fpostgres.git Fix long-standing segfault when accept() or one of the calls made right after accepting a connection fails, and the server is compiled with GSSAPI support. Report and patch by Alexander V. Chernikov, bug #5731. --- diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 435f03b809..4e789311fe 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -1917,7 +1917,7 @@ ConnCreate(int serverFd) if (port->sock >= 0) StreamClose(port->sock); ConnFree(port); - port = NULL; + return NULL; } else {