summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2006-08-21 10:48:21 +0000
committerMichael Meskes <meskes@postgresql.org>2006-08-21 10:48:21 +0000
commit333bc29fcbe3b0fcb81380fba9e7fcee6e7854b7 (patch)
treebdd5d220a8e7fcfde8659f3b3e0d7937da1df9b3 /src
parent2b2a50722cb1863147b4a86b3db80553f989a14c (diff)
Fixed a few memory leaks. One indeed was part of a loop.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_ctl/pg_ctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 32aab1beb08..e51d3668c2f 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -4,7 +4,7 @@
*
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.70 2006/06/25 04:37:55 alvherre Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.71 2006/08/21 10:48:21 meskes Exp $
*
*-------------------------------------------------------------------------
*/
@@ -320,6 +320,7 @@ readfile(const char *path)
result[nlines++] = xstrdup(buffer);
fclose(infile);
+ free(buffer);
result[nlines] = NULL;
return result;
@@ -465,6 +466,7 @@ test_postmaster_connection(void)
}
else
{
+ PQfinish(conn);
print_msg(".");
pg_usleep(1000000); /* 1 sec */
}
@@ -854,6 +856,7 @@ do_status(void)
if (optlines != NULL)
for (; *optlines != NULL; optlines++)
fputs(*optlines, stdout);
+ free(optlines);
return;
}
}