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

Commitcc1b915

Browse files
authored
Merge pull request#14 from postgrespro/pp5692
ee: Use memory context instead of malloc in ATX handling
2 parents0d9e756 +fdb4d41 commitcc1b915

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