diff options
Diffstat (limited to 'src/bin/psql/input.c')
-rw-r--r-- | src/bin/psql/input.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index 07c9e89f368..f2b6e4ed7fa 100644 --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -298,11 +298,7 @@ initializeInput(int flags) if (histfile == NULL) { if (get_home_path(home)) - { - psql_history = pg_malloc(strlen(home) + 1 + - strlen(PSQLHISTORY) + 1); - snprintf(psql_history, MAXPGPATH, "%s/%s", home, PSQLHISTORY); - } + pg_asprintf(&psql_history, "%s/%s", home, PSQLHISTORY); } else { |