1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00

Fix resource leak pointed out by Coverity.

This commit is contained in:
Tatsuo Ishii 2014-12-30 20:19:50 +09:00
parent ae17897ce8
commit 3b5a89c482

View File

@ -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;
}