mirror of https://github.com/citusdata/citus.git
casual blocks: fixed potential NULL dereference (#7704)
The result of FindWorkerNode() is usually checked against NULL.pull/7662/head^2
parent
30bf960c5c
commit
afcda3feff
|
@ -431,6 +431,11 @@ PrepareAndSetTransactionClock(void)
|
||||||
MultiConnection *connection = dlist_container(MultiConnection, transactionNode,
|
MultiConnection *connection = dlist_container(MultiConnection, transactionNode,
|
||||||
iter.cur);
|
iter.cur);
|
||||||
WorkerNode *workerNode = FindWorkerNode(connection->hostname, connection->port);
|
WorkerNode *workerNode = FindWorkerNode(connection->hostname, connection->port);
|
||||||
|
if (!workerNode)
|
||||||
|
{
|
||||||
|
ereport(WARNING, errmsg("Worker node is missing"));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Skip the node if we already in the list */
|
/* Skip the node if we already in the list */
|
||||||
if (list_member_int(nodeList, workerNode->groupId))
|
if (list_member_int(nodeList, workerNode->groupId))
|
||||||
|
|
Loading…
Reference in New Issue