pgpool2.git / summary / log / commit / refs

commit    231b292763c68ec927f03362bb8bce8d6fb75a73
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Sat Dec 15 13:52:39 2012 +0000

    Fix child_exit() to not call send_frontend_exits() if there's no
    connection pool, otherwise it segfaults because send_frontend_exits()
    referes to objects pointed to by pool_connection_pool.  This could
    happen in worker_child while it tries to do s_do_auth() and it calls
    pool_read() failed to read backend socket then calls child_exit().
    Per bug track #44.


child.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/child.c b/child.c index 6a4300e1f..359b1c0a8 100644 --- a/child.c +++ b/child.c @@ -1418,7 +1418,8 @@ void child_exit(int code) } /* let backend know now we are exiting */ - send_frontend_exits(); + if (pool_connection_pool) + send_frontend_exits(); exit(code); } [parent: 22e045e2f362]