diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 2006-07-31 05:15:14 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 2006-07-31 05:15:14 +0000 |
commit | 68dfef040b6f5d2956936ffe8b0d070aabaf7d3f (patch) | |
tree | 1f152d8202402c5e0bb2ba92c8d6d35bba30adcf | |
parent | 6e38e34d64b5769272e0ab873416aa6c95509b50 (diff) | |
download | postgresql-68dfef040b6f5d2956936ffe8b0d070aabaf7d3f.tar.gz postgresql-68dfef040b6f5d2956936ffe8b0d070aabaf7d3f.zip |
Fix memory allocation bug in pgbench.
patches submitted by ITAGAKI Takahiro.
-rw-r--r-- | contrib/pgbench/pgbench.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 822cb849461..206b3a66ae2 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.51 2006/07/28 22:58:26 ishii Exp $ + * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.52 2006/07/31 05:15:14 ishii Exp $ * * pgbench: a simple benchmark program for PostgreSQL * written by Tatsuo Ishii @@ -1344,7 +1344,7 @@ main(int argc, char **argv) exit(1); } - memset(state + sizeof(*state), 0, sizeof(*state) * (nclients - 1)); + memset(state + 1, 0, sizeof(*state) * (nclients - 1)); for (i = 1; i < nclients; i++) { |