From 1c9e06fbeab14314620802a831dc0c3acb4e0847 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sun, 30 Aug 2015 17:39:58 -0400 Subject: [PATCH] Remove unneeded hash table existence check in agent_destroy MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This function can never be called if the agent failed to initialize its hash table. If such a failure occurs, the agent constructor will return NULL and its caller should handle the error. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/agent.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index 082163086..9ec98167e 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -967,14 +967,6 @@ void agent_destroy(struct agent *agt) DBG3("Agent destroy"); - /* - * Just ignore if no events hash table exists. This is possible if for - * instance an agent object was allocated but not initialized. - */ - if (!agt->events) { - return; - } - rcu_read_lock(); cds_lfht_for_each_entry(agt->events->ht, &iter.iter, node, node) { int ret; -- 2.34.1