psql: fix startup crash caused by PSQLRC containing a tilde
Bruce Momjian <bruce@momjian.us>
psql: fix startup crash caused by PSQLRC containing a tilde 'strdup' the PSQLRC environment variable value before calling a routine that might free() it. Backpatch to 9.2, where the bug first appeared.
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/psql/common.c | modified | +3 −3 |
| src/bin/psql/common.h | modified | +1 −1 |
| src/bin/psql/startup.c | modified | +6 −5 |