Commit 4e23d6e0 authored by Michael Meskes's avatar Michael Meskes

Fixed a few trivial memory leaks reported by Coverity just to test my setup.

parent fc19744e
......@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.120 2006/07/31 01:16:37 tgl Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.121 2006/08/20 16:08:09 meskes Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -419,6 +419,7 @@ readfile(char *path)
}
fclose(infile);
free(buffer);
result[nlines] = NULL;
return result;
......@@ -1058,6 +1059,7 @@ set_short_version(char *short_version, char *extrapath)
progname, path, strerror(errno));
exit_nicely();
}
free(path);
}
/*
......@@ -1085,6 +1087,7 @@ set_null_conf(void)
progname, path, strerror(errno));
exit_nicely();
}
free(path);
}
/*
......@@ -1543,6 +1546,9 @@ get_set_pwd(void)
PG_CMD_PRINTF2("ALTER USER \"%s\" WITH PASSWORD E'%s';\n",
username, escape_quotes(pwd1));
/* MM: pwd1 is no longer needed, freeing it */
free(pwd1);
PG_CMD_CLOSE;
check_ok();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment