Remove unneeded hash table existence check in agent_destroy
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 30 Aug 2015 21:39:58 +0000 (17:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 1 Sep 2015 16:03:08 +0000 (12:03 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/agent.c

index 0821630865106182365cd404fecaf0cd9bcb64cc..9ec98167eb5a3c4db7c6f428cca926ac6b2f42d6 100644 (file)
@@ -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;
This page took 0.027457 seconds and 5 git commands to generate.