Skip to content

Commit 68dfef0

Browse files
committed
Fix memory allocation bug in pgbench.
patches submitted by ITAGAKI Takahiro.
1 parent 6e38e34 commit 68dfef0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pgbench/pgbench.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.51 2006/07/28 22:58:26 ishii Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.52 2006/07/31 05:15:14 ishii Exp $
33
*
44
* pgbench: a simple benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -1344,7 +1344,7 @@ main(int argc, char **argv)
13441344
exit(1);
13451345
}
13461346

1347-
memset(state + sizeof(*state), 0, sizeof(*state) * (nclients - 1));
1347+
memset(state + 1, 0, sizeof(*state) * (nclients - 1));
13481348

13491349
for (i = 1; i < nclients; i++)
13501350
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy