From: Jérémie Galarneau Date: Sun, 30 Aug 2015 21:39:58 +0000 (-0400) Subject: Remove unneeded hash table existence check in agent_destroy X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=1c9e06fbeab14314620802a831dc0c3acb4e0847 Remove unneeded hash table existence check in agent_destroy 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 --- 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;