diff --git a/src/bin/pg_verify_checksums/pg_verify_checksums.c b/src/bin/pg_verify_checksums/pg_verify_checksums.c index a941236563..965ec70557 100644 --- a/src/bin/pg_verify_checksums/pg_verify_checksums.c +++ b/src/bin/pg_verify_checksums/pg_verify_checksums.c @@ -78,7 +78,7 @@ skipfile(char *fn) static void scan_file(char *fn, int segmentno) { - char buf[BLCKSZ]; + char *buf = palloc(BLCKSZ); PageHeader header = (PageHeader) buf; int f; int blockno; @@ -127,6 +127,8 @@ scan_file(char *fn, int segmentno) _("%s: checksums verified in file \"%s\"\n"), progname, fn); close(f); + + pfree(buf); } static void