Fix for segfault, When the pgpool-II child process is reused after
authorMuhammad Usama <m.usama@gmail.com>
Thu, 26 Mar 2015 11:44:58 +0000 (16:44 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Thu, 26 Mar 2015 11:58:01 +0000 (16:58 +0500)
previous session for the same child had exited because of some ERROR.
Thanks to Tatsuo for catching this.

src/protocol/child.c

index b8a9ae58ae816f47f3409f06120e262a69482323..6fe9b02d221791b8a6b8d6f2907f78c61342b6d2 100644 (file)
@@ -284,6 +284,7 @@ void do_child(int *fds)
                MemoryContextSwitchTo(ProcessLoopContext);
                MemoryContextResetAndDeleteChildren(ProcessLoopContext);
 
+               backend = NULL;
                idle = 1;
 
                /* pgpool stop request already sent? */