From 0128790d7d9f5a856488646e8ea29bc51619670a Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 10 Jan 2013 10:18:31 -0500 Subject: [PATCH] Fix: wrong loop continuation in metadata thread The validation of the endpoint status can change the metadata hash table meaning stream(s) can be removed from it and the poll set. After that, continuing the for loop was making the thread use possible invalid file descriptor that were not in the hash table anymore trigerring the lookup assert of the node just after the for loop. The very important part here is that when the metadata ht changes, we MUST go back to the poll wait() to synchronize the subset of fd we are looking at. Reported-by: Jesus Garcia Acked-by: Mathieu Desnoyers Signed-off-by: David Goulet --- src/common/consumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/consumer.c b/src/common/consumer.c index 27dfe32b8..935a03d23 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2155,7 +2155,7 @@ restart: if (stream == NULL) { /* Check for deleted streams. */ validate_endpoint_status_metadata_stream(&events); - continue; + goto restart; } DBG("Adding metadata stream %d to poll set", -- 2.39.5