summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-09-17 20:33:45 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-09-17 20:33:45 +0000
commit239f74d28d1f5eeec51b2e6f15d5a7bcd2b55801 (patch)
tree1f74fbb40ce2d7f87a7470d2d0647a2e764f87f8 /src/bin/psql/command.c
parentb5d609a30087afb67b4c7dac73f63f9b471d32a6 (diff)
psql forgot to close connection before re-issuing password prompt.
([BUGS] psql can crash the backend on login, 2000-09-03)
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 3f160d382e7..d563070ae68 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.35 2000/07/17 18:24:32 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.36 2000/09/17 20:33:45 petere Exp $
*/
#include "postgres.h"
#include "command.h"
@@ -1237,6 +1237,7 @@ do_connect(const char *new_dbname, const char *new_user)
if (PQstatus(pset.db) == CONNECTION_BAD &&
strcmp(PQerrorMessage(pset.db), "fe_sendauth: no password supplied\n") == 0)
{
+ PQfinish(pset.db);
need_pass = true;
free(prompted_password);
prompted_password = NULL;