Fix null pointer dereference in "\c" psql command.
authorNoah Misch <noah@leadboat.com>
Thu, 9 Jul 2015 00:44:21 +0000 (20:44 -0400)
committerNoah Misch <noah@leadboat.com>
Thu, 9 Jul 2015 00:44:26 +0000 (20:44 -0400)
commit49008d64507858678becf59f7e7caa75afb04cf2
treea8ef594aace8c388dbc67b0e2b27ba0d9f748431
parentdca992d8b099ab71b14cd4aa09f31506e3903224
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