diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-08-06 18:17:42 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-08-06 18:17:42 +0000 |
commit | 80185f4b5ba3768af42d79903698b5019140fbe5 (patch) | |
tree | 3742444ea2ba3f03a41fce7f18b2d32e3e96347d | |
parent | 246793469e0bee5957976994983b5b572221a367 (diff) | |
download | postgresql-80185f4b5ba3768af42d79903698b5019140fbe5.tar.gz postgresql-80185f4b5ba3768af42d79903698b5019140fbe5.zip |
Seems like a bad idea to free() a string we are about to use in an
error message.
-rw-r--r-- | src/backend/utils/init/miscinit.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 99fc6824c60..86b46106cd3 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -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); |