Fix very minor memory leaks in psql's command.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 27 Jul 2017 15:10:38 +0000 (11:10 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 27 Jul 2017 15:10:38 +0000 (11:10 -0400)
commitdc4da3dc84c7c0d1a58275f78f0e3401385e3700
treee81ff897285d51bcae5a90d8b9f9ebaad096c48e
parentefd7f8e36553cd32e445061cbbc80d32028f4248
Fix very minor memory leaks in psql's command.c.

\drds leaked its second pattern argument if any, and \connect leaked
any empty-string or "-" arguments.  These are old bugs, but it's hard
to imagine any real use-case where the leaks could amount to anything
meaningful, so not bothering with a back-patch.

Daniel Gustafsson and Tom Lane

Discussion: https://postgr.es/m/3641F19B-336A-431A-86CE-A80562505C5E@yesql.se
src/bin/psql/command.c