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

Commit80185f4

Browse files
committed
Seems like a bad idea to free() a string we are about to use in an
error message.
1 parent2467934 commit80185f4

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

‎src/backend/utils/init/miscinit.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.74 2001/08/0613:45:15 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.75 2001/08/0618:17:42 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -168,16 +168,12 @@ SetDataDir(const char *dir)
168168
* Check if the directory has group or world access. If so, reject.
169169
*/
170170
if (stat(new,&stat_buf)==-1)
171-
{
172-
free(new);
173-
elog(FATAL,"could not read permissions of directory %s: %s",new,strerror(errno));
174-
}
171+
elog(FATAL,"could not read permissions of directory %s: %s",
172+
new,strerror(errno));
175173

176174
if (stat_buf.st_mode& (S_IRWXG |S_IRWXO))
177-
{
178-
free(new);
179-
elog(FATAL,"data directory %s has group or world access; permissions should be u=rwx (0700)",new);
180-
}
175+
elog(FATAL,"data directory %s has group or world access; permissions should be u=rwx (0700)",
176+
new);
181177

182178
if (DataDir)
183179
free(DataDir);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp