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

Commit2209c0f

Browse files
committed
Preserve errno across free().
Dept. of second thoughts: free() isn't guaranteed not to change errno.Make sure we report the right error if getcwd() fails.
1 parent9aca512 commit2209c0f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/port/path.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,10 @@ make_absolute_path(const char *path)
608608
}
609609
else
610610
{
611+
intsave_errno=errno;
612+
611613
free(buf);
614+
errno=save_errno;
612615
#ifndefFRONTEND
613616
elog(ERROR,"could not get current working directory: %m");
614617
#else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp