Commit 80185f4b authored by Tom Lane's avatar Tom Lane

Seems like a bad idea to free() a string we are about to use in an

error message.
parent 24679346
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.74 2001/08/06 13:45:15 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.75 2001/08/06 18:17:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -168,16 +168,12 @@ SetDataDir(const char *dir)
* Check if the directory has group or world access. If so, reject.
*/
if (stat(new, &stat_buf) == -1)
{
free(new);
elog(FATAL, "could not read permissions of directory %s: %s", new, strerror(errno));
}
elog(FATAL, "could not read permissions of directory %s: %s",
new, strerror(errno));
if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
{
free(new);
elog(FATAL, "data directory %s has group or world access; permissions should be u=rwx (0700)", new);
}
elog(FATAL, "data directory %s has group or world access; permissions should be u=rwx (0700)",
new);
if (DataDir)
free(DataDir);
......
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