pgpool2.git / summary / log / commit / refs
commit 063cfb3f3a28c08afa462d0f070ec3ff3af5a149
Author: Toshihiro Kitagawa <kitagawa at sraoss.co.jp>
Date: Thu Jan 06 09:35:58 2011 +0000
Fix the bug which makes a child process crash while doing failover.
This bug has been there since pgpool-II 3.0.
child.c | 1 +
pool_connection_pool.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/child.c b/child.c
index a9300d8bc..19f334c34 100644
--- a/child.c
+++ b/child.c
@@ -1303,6 +1303,7 @@ void pool_free_startup_packet(StartupPacket *sp)
free(sp->user);
free(sp);
}
+ sp = NULL;
}
/*
diff --git a/pool_connection_pool.c b/pool_connection_pool.c
index d877a379e..05d093b9c 100644
--- a/pool_connection_pool.c
+++ b/pool_connection_pool.c
@@ -591,6 +591,7 @@ static POOL_CONNECTION_POOL_SLOT *create_cp(POOL_CONNECTION_POOL_SLOT *cp, int s
return NULL;
}
+ cp->sp = NULL;
cp->con = pool_open(fd);
cp->closetime = 0;
return cp;
[parent: 83c6c895d44f]