Kevin Grittner <kgri...@ymail.com> wrote:
> Memory Error
> Double free: 1
> Memory leak: 1
These both seemed legitimate to me. Patch attached. Any
objections to applying it? I realize the memory leak is a tiny one
in the regression testing code, so it could never amount to enough
to matter; but it seems worth fixing just to avoid noise in code
analyzers.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index 1dfb80f..5faef52 100644
--- a/src/bin/pg_basebackup/streamutil.c
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -117,7 +117,10 @@ GetConnection(void)
while (true)
{
if (password)
+ {
free(password);
+ password = NULL;
+ }
if (dbpassword)
{
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index a902e9b..e8dec46 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -1655,6 +1655,8 @@ run_schedule(const char *schedule, test_function tfunc)
}
}
+ free_stringlist(&ignorelist);
+
fclose(scf);
}
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers