From 25114d3e293f00b59be722b6148cdc00d2eb1b4d Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 22 Jul 2003 19:13:19 +0000
Subject: [PATCH] wups, took out one memset too many ...

---
 src/backend/postmaster/pgstat.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index c2bb6274345..5ed1247e951 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -13,7 +13,7 @@
  *
  *	Copyright (c) 2001-2003, PostgreSQL Global Development Group
  *
- *	$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.38 2003/07/22 19:00:10 tgl Exp $
+ *	$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.39 2003/07/22 19:13:19 tgl Exp $
  * ----------
  */
 #include "postgres.h"
@@ -799,7 +799,7 @@ pgstat_ping(void)
 void
 pgstat_initstats(PgStat_Info *stats, Relation rel)
 {
-	PgStat_TableEntry *useent = NULL;
+	PgStat_TableEntry *useent;
 	Oid			rel_id = rel->rd_id;
 	int			mb;
 	int			i;
@@ -875,6 +875,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
 		 */
 		i = pgStatTabstatMessages[mb]->m_nentries++;
 		useent = &pgStatTabstatMessages[mb]->m_entry[i];
+		MemSet(useent, 0, sizeof(PgStat_TableEntry));
 		useent->t_id = rel_id;
 		stats->tabentry = (void *) useent;
 		return;
@@ -922,6 +923,7 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
 	mb = pgStatTabstatUsed++;
 	pgStatTabstatMessages[mb]->m_nentries = 1;
 	useent = &pgStatTabstatMessages[mb]->m_entry[0];
+	MemSet(useent, 0, sizeof(PgStat_TableEntry));
 	useent->t_id = rel_id;
 	stats->tabentry = (void *) useent;
 }
-- 
GitLab