8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6657d85 commit 67d955dCopy full SHA for 67d955d
contrib/mmts/multimaster.c
@@ -2163,6 +2163,7 @@ static void MtmSplitConnStrs(void)
2163
int i;
2164
FILE* f = NULL;
2165
char buf[MULTIMASTER_MAX_CTL_STR_SIZE];
2166
+ MemoryContext old_context = MemoryContextSwitchTo(TopMemoryContext);
2167
2168
if (*MtmConnStrs == '@') {
2169
f = fopen(MtmConnStrs+1, "r");
@@ -2276,8 +2277,9 @@ static void MtmSplitConnStrs(void)
2276
2277
Assert(end != NULL);
2278
len = end - dbName;
2279
MtmDatabaseName = pnstrdup(dbName, len);
- }
2280
-}
+ }
2281
+ MemoryContextSwitchTo(old_context);
2282
+}
2283
2284
static bool ConfigIsSane(void)
2285
{
0 commit comments