diff options
-rw-r--r-- | contrib/pgbench/pgbench.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 0384231083b..97dcad0ce64 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1386,6 +1386,7 @@ parseQuery(Command *cmd, const char *raw_sql) if (cmd->argc >= MAX_ARGS) { fprintf(stderr, "statement has too many arguments (maximum is %d): %s\n", MAX_ARGS - 1, raw_sql); + free(name); return false; } @@ -1582,6 +1583,7 @@ process_file(char *filename) fd = stdin; else if ((fd = fopen(filename, "r")) == NULL) { + free(my_commands); fprintf(stderr, "%s: %s\n", filename, strerror(errno)); return false; } |