Allocate enough space for transaction nodes

This fix prevents any potential memory access that might occur
while forming the deadlock path.
pull/2079/head
Onder Kalaci 2018-01-19 14:06:09 +02:00 committed by velioglu
parent b2fa25ddd5
commit 0880a3e1b4
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ CheckForDistributedDeadlocks(void)
{
bool deadlockFound = false;
List *deadlockPath = NIL;
TransactionNode *transactionNodeStack[edgeCount];
TransactionNode *transactionNodeStack[edgeCount + 1];
/* we're only interested in finding deadlocks originating from this node */
if (transactionNode->transactionId.initiatorNodeIdentifier != localGroupId)