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

Commitdd917bb

Browse files
committed
Allocate fresh memory for post_opts/exec_path
Instead of having read_post_opts() depend on the memory allocated forthe config file (which is now getting free'd), pg_strdup() forpost_opts and exec_path (similar to how it's being done elsewhere).Noted by Thom Brown.
1 parent956685f commitdd917bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,10 +730,10 @@ read_post_opts(void)
730730
{
731731
*arg1='\0';/* terminate so we get only program
732732
* name */
733-
post_opts=arg1+1;/* point past whitespace */
733+
post_opts=pg_strdup(arg1+1);/* point past whitespace */
734734
}
735735
if (exec_path==NULL)
736-
exec_path=optline;
736+
exec_path=pg_strdup(optline);
737737
}
738738

739739
/* Free the results of readfile. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp