aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 260893523a5..3a884028b54 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -1133,12 +1133,7 @@ exec_command(const char *cmd,
while ((opt = psql_scan_slash_option(scan_state,
OT_NORMAL, NULL, false)))
{
- newval = realloc(newval, strlen(newval) + strlen(opt) + 1);
- if (!newval)
- {
- psql_error("out of memory\n");
- exit(EXIT_FAILURE);
- }
+ newval = pg_realloc(newval, strlen(newval) + strlen(opt) + 1);
strcat(newval, opt);
free(opt);
}