Allocate enough space for transaction nodes

This fix prevents any potential memory access that might occur
while forming the deadlock path.
pull/1961/head
Onder Kalaci 2018-01-19 14:06:09 +02:00
parent 9a89c0b425
commit fbde87d2d0
1 changed files with 1 additions and 1 deletions

View File

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