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

Commit67d955d

Browse files
committed
Allocate MtmDatabaseName in TopMemoryContext
1 parent6657d85 commit67d955d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎contrib/mmts/multimaster.c‎

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

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

22822284
staticboolConfigIsSane(void)
22832285
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp