projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5730d28
)
Fix the failover() so that it does not access out of array.
author
Tatsuo Ishii
<ishii@sraoss.co.jp>
Wed, 17 Jul 2019 07:51:31 +0000
(16:51 +0900)
committer
Tatsuo Ishii
<ishii@sraoss.co.jp>
Fri, 19 Jul 2019 07:44:52 +0000
(16:44 +0900)
Per Coverity.
src/main/pgpool_main.c
patch
|
blob
|
blame
|
history
diff --git
a/src/main/pgpool_main.c
b/src/main/pgpool_main.c
index f7591da2006da0de51bcf4361e2613fb389820f3..2eeeb40c1d5d5d82ff5472245513fc9eda9e354b 100644
(file)
--- a/
src/main/pgpool_main.c
+++ b/
src/main/pgpool_main.c
@@
-2025,6
+2025,7
@@
static void failover(void)
{
/* only if the failover is against the current primary */
if (((reqkind == NODE_DOWN_REQUEST) &&
+ Req_info->primary_node_id >= 0 &&
(nodes[Req_info->primary_node_id])) ||
(node_id >= 0 && (reqkind == PROMOTE_NODE_REQUEST) &&
(VALID_BACKEND(node_id))))