mirror of https://github.com/citusdata/citus.git
casual blocks: fixed potential NULL dereference
The result of FindWorkerNode() is usually checked against NULL. Signed-off-by: Maksim Korotkov <m.korotkov@postgrespro.ru>pull/7704/head
parent
f6959715dc
commit
41e3392f30
|
@ -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