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

Commitab441db

Browse files
knizhnikkelvich
authored andcommitted
Fix dangling pointer access
1 parenta4bddc7 commitab441db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎pglogical_apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ process_remote_commit(StringInfo in)
662662
casePGLOGICAL_PREPARE:
663663
{
664664
Assert(IsTransactionState()&&TransactionIdIsValid(MtmGetCurrentTransactionId()));
665-
gid=pq_getmsgstring(in);
665+
gid=pstrdup(pq_getmsgstring(in));/* in case of spilling large transaction to the file, message body will be deallocated, so copy it */
666666
if (MtmExchangeGlobalTransactionStatus(gid,TRANSACTION_STATUS_IN_PROGRESS)==TRANSACTION_STATUS_ABORTED) {
667667
MTM_LOG1("Avoid prepare of previously aborted global transaction %s",gid);
668668
AbortCurrentTransaction();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp