Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit333bc29

Browse files
author
Michael Meskes
committed
Fixed a few memory leaks. One indeed was part of a loop.
1 parent2b2a507 commit333bc29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.70 2006/06/25 04:37:55 alvherre Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.71 2006/08/21 10:48:21 meskes Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -320,6 +320,7 @@ readfile(const char *path)
320320
result[nlines++]=xstrdup(buffer);
321321

322322
fclose(infile);
323+
free(buffer);
323324
result[nlines]=NULL;
324325

325326
returnresult;
@@ -465,6 +466,7 @@ test_postmaster_connection(void)
465466
}
466467
else
467468
{
469+
PQfinish(conn);
468470
print_msg(".");
469471
pg_usleep(1000000);/* 1 sec */
470472
}
@@ -854,6 +856,7 @@ do_status(void)
854856
if (optlines!=NULL)
855857
for (;*optlines!=NULL;optlines++)
856858
fputs(*optlines,stdout);
859+
free(optlines);
857860
return;
858861
}
859862
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp