File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 4242 * Portions Copyright (c) 1994, Regents of the University of California
4343 * Portions taken from FreeBSD.
4444 *
45- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.120 2006/07/31 01: 16:37 tgl Exp $
45+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.121 2006/08/20 16:08:09 meskes Exp $
4646 *
4747 *-------------------------------------------------------------------------
4848 */
@@ -419,6 +419,7 @@ readfile(char *path)
419419 }
420420
421421 fclose (infile );
422+ free (buffer );
422423 result [nlines ] = NULL ;
423424
424425 return result ;
@@ -1058,6 +1059,7 @@ set_short_version(char *short_version, char *extrapath)
10581059 progname , path , strerror (errno ));
10591060 exit_nicely ();
10601061 }
1062+ free (path );
10611063}
10621064
10631065/*
@@ -1085,6 +1087,7 @@ set_null_conf(void)
10851087 progname , path , strerror (errno ));
10861088 exit_nicely ();
10871089 }
1090+ free (path );
10881091}
10891092
10901093/*
@@ -1543,6 +1546,9 @@ get_set_pwd(void)
15431546 PG_CMD_PRINTF2 ("ALTER USER \"%s\" WITH PASSWORD E'%s';\n" ,
15441547 username , escape_quotes (pwd1 ));
15451548
1549+ /* MM: pwd1 is no longer needed, freeing it */
1550+ free (pwd1 );
1551+
15461552 PG_CMD_CLOSE ;
15471553
15481554 check_ok ();
You can’t perform that action at this time.
0 commit comments