Commit 3b5a89c4 authored by Tatsuo Ishii's avatar Tatsuo Ishii

Fix resource leak pointed out by Coverity.

parent ae17897c
......@@ -2134,6 +2134,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);
pg_free(name);
return false;
}
......@@ -2410,6 +2411,7 @@ process_file(char *filename)
else if ((fd = fopen(filename, "r")) == NULL)
{
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
pg_free(my_commands);
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment