pgpool2.git / summary / log / commit / refs
commit 1929b461e467d6a7783d731d0ea897ec05ad6529
Author: Tatsuo Ishii <ishii at sraoss.co.jp>
Date: Sat Apr 23 05:10:46 2011 +0000
Fix bug with pcp_connect() which causes double free.
Fix contributed by Jehan-Guillaume (ioguix) de Rorthais.
pcp/pcp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pcp/pcp.c b/pcp/pcp.c
index 08532d34a..7ccb07780 100644
--- a/pcp/pcp.c
+++ b/pcp/pcp.c
@@ -8,7 +8,7 @@
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2010 PgPool Global Development Group
+ * Copyright (c) 2003-2011 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -168,6 +168,7 @@ pcp_connect(char *hostname, int port, char *username, char *password)
if (pcp_authorize(username, password) < 0)
{
pcp_close(pc);
+ pc = NULL;
return -1;
}
@@ -1539,4 +1540,3 @@ static int _pcp_promote_node(int nid, bool gracefully)
free(buf);
return -1;
}
-
[parent: 3ce503faa489]