projects
/
users
/
andresfreund
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae17897
)
Fix resource leak pointed out by Coverity.
author
Tatsuo Ishii
<
[email protected]
>
Tue, 30 Dec 2014 11:19:50 +0000
(20:19 +0900)
committer
Tatsuo Ishii
<
[email protected]
>
Tue, 30 Dec 2014 11:33:01 +0000
(20:33 +0900)
contrib/pgbench/pgbench.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pgbench/pgbench.c
b/contrib/pgbench/pgbench.c
index 1362f44673e02d6a2270a5deaf193a7f9a6f6623..2761d1d68fb9ce91cc1730148415b5a53e0076b7 100644
(file)
--- a/
contrib/pgbench/pgbench.c
+++ b/
contrib/pgbench/pgbench.c
@@
-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;
}