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

Commit9fc7dc3

Browse files
committed
Allocate MtmDatabaseName in TopMemoryContext
1 parenta208d57 commit9fc7dc3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎multimaster.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,6 +2162,7 @@ static void MtmSplitConnStrs(void)
21622162
inti;
21632163
FILE*f=NULL;
21642164
charbuf[MULTIMASTER_MAX_CTL_STR_SIZE];
2165+
MemoryContextold_context=MemoryContextSwitchTo(TopMemoryContext);
21652166

21662167
if (*MtmConnStrs=='@') {
21672168
f=fopen(MtmConnStrs+1,"r");
@@ -2275,8 +2276,9 @@ static void MtmSplitConnStrs(void)
22752276
Assert(end!=NULL);
22762277
len=end-dbName;
22772278
MtmDatabaseName=pnstrdup(dbName,len);
2278-
}
2279-
}
2279+
}
2280+
MemoryContextSwitchTo(old_context);
2281+
}
22802282

22812283
staticboolConfigIsSane(void)
22822284
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp