Fix null pointer dereference in "\c" psql command.
authorNoah Misch
Thu, 9 Jul 2015 00:44:21 +0000 (20:44 -0400)
committerNoah Misch
Thu, 9 Jul 2015 00:44:26 +0000 (20:44 -0400)
commiteb1525e8968e64c7ec31701fa02c6da999b58d1a
tree6401b0432b57e2199dca49a5b0f49a360195a725
parent58c58d1a9f4ba5372f683eb823e065ed12469e5e
Fix null pointer dereference in "\c" psql command.

The psql crash happened when no current connection existed.  (The second
new check is optional given today's undocumented NULL argument handling
in PQhost() etc.)  Back-patch to 9.0 (all supported versions).
src/bin/psql/command.c