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 a208d57 commit 9fc7dc3Copy full SHA for 9fc7dc3
multimaster.c
@@ -2162,6 +2162,7 @@ static void MtmSplitConnStrs(void)
2162
int i;
2163
FILE* f = NULL;
2164
char buf[MULTIMASTER_MAX_CTL_STR_SIZE];
2165
+ MemoryContext old_context = MemoryContextSwitchTo(TopMemoryContext);
2166
2167
if (*MtmConnStrs == '@') {
2168
f = fopen(MtmConnStrs+1, "r");
@@ -2275,8 +2276,9 @@ static void MtmSplitConnStrs(void)
2275
2276
Assert(end != NULL);
2277
len = end - dbName;
2278
MtmDatabaseName = pnstrdup(dbName, len);
- }
2279
-}
+ }
2280
+ MemoryContextSwitchTo(old_context);
2281
+}
2282
2283
static bool ConfigIsSane(void)
2284
{
0 commit comments