Destruct MyTmGxactLocal->waitGxids with list_free() instead of pfree().
MyTmGxactLocal->waitGxids is a List of gxids, but it's currently destructed with pfree().
This commit changes it to list_free().
@@ -1308,7 +1308,7 @@ doDispatchDtxProtocolCommand(DtxProtocolCommand dtxProtocolCommand,
int lastRepeat = -1;
if (MyTmGxactLocal->waitGxids)
{
- pfree(MyTmGxactLocal->waitGxids);
+ list_free(MyTmGxactLocal->waitGxids);
MyTmGxactLocal->waitGxids = NULL;
}
@@ -1417,7 +1417,7 @@ resetGxact(void)
MyTmGxactLocal->isOnePhaseCommit = false;
if (MyTmGxactLocal->waitGxids != NULL)
{
- pfree(MyTmGxactLocal->waitGxids);
+ list_free(MyTmGxactLocal->waitGxids);
MyTmGxactLocal->waitGxids = NULL;
}
setCurrentDtxState(DTX_STATE_NONE);
