mirror of
https://github.com/postgres/postgres.git
synced 2026-06-03 14:00:01 -04:00
Fix resource leak pointed out by Coverity.
This commit is contained in:
parent
1f35d93843
commit
458e8bc653
1 changed files with 2 additions and 0 deletions
|
|
@ -1929,6 +1929,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;
|
||||
}
|
||||
|
||||
|
|
@ -2169,6 +2170,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue