projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67dc4b5
)
Fix resource leak pointed out by Coverity.
author
Tatsuo Ishii
Tue, 30 Dec 2014 10:59:26 +0000
(19:59 +0900)
committer
Tatsuo Ishii
Tue, 30 Dec 2014 10:59:26 +0000
(19:59 +0900)
contrib/pgbench/pgbench.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pgbench/pgbench.c
b/contrib/pgbench/pgbench.c
index d87e75c7702f72bc4a9dbad53685f1b04c886e17..2111f16f3587da0435fc5a21c1dee750e0e39393 100644
(file)
--- a/
contrib/pgbench/pgbench.c
+++ b/
contrib/pgbench/pgbench.c
@@
-1473,6
+1473,7
@@
parseQuery(Command *cmd, const char *raw_sql)
if (cmd->argc >= MAX_ARGS)
{
+ free(name);
fprintf(stderr, "statement has too many arguments (maximum is %d): %s\n", MAX_ARGS - 1, raw_sql);
return false;
}
@@
-1670,6
+1671,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;
}