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-Tag: REL9_1_ALPHA2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=869af50fcfdd4448b2dc637d905f1afda689741d;p=postgresql 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 8caa62ad0e..f24a091ef8 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -1975,7 +1975,7 @@ ConnCreate(int serverFd) if (port->sock >= 0) StreamClose(port->sock); ConnFree(port); - port = NULL; + return NULL; } else {