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

Commitfdb4d41

Browse files
committed
ee: Use memory context instead of malloc in ATX handling
PGPRO-5692 / PGPRO-5336
1 parent3ad0c98 commitfdb4d41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ MtmDeserializeTransactionState(void *ctx)
366366
staticvoid*
367367
MtmSuspendTransaction(void)
368368
{
369-
MtmCurrentTrans*ctx=malloc(sizeof(MtmCurrentTrans));
369+
MtmCurrentTrans*ctx=MemoryContextAlloc(CurTransactionContext,sizeof(MtmCurrentTrans));
370370

371371
*ctx=MtmTx;
372372
returnctx;
@@ -376,7 +376,7 @@ static void
376376
MtmResumeTransaction(void*ctx)
377377
{
378378
MtmTx=*(MtmCurrentTrans*)ctx;
379-
free(ctx);
379+
pfree(ctx);
380380
}
381381
#endif
382382

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp