Fix verbose and debug mode options
[babeltrace.git] / lib / plugin-system / plugin.c
index f3d23268f7c83f326de6bb12a0d907df7a27f6fc..8bc0fc09c3f049af24ed1c854a08012afdc8baa8 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Babeltrace Plugin
  * 
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
@@ -46,6 +46,10 @@ void bt_plugin_destroy(struct bt_object *obj)
        assert(obj);
        plugin = container_of(obj, struct bt_plugin, base);
 
+       if (plugin->exit) {
+               plugin->exit();
+       }
+
        if (plugin->module) {
                if (!g_module_close(plugin->module)) {
                                printf_error("Module close error: %s",
@@ -53,9 +57,6 @@ void bt_plugin_destroy(struct bt_object *obj)
                }
        }
 
-       if (plugin->exit) {
-               plugin->exit();
-       }
        g_string_free(plugin->path, TRUE);
        g_free(plugin);
 }
This page took 0.024525 seconds and 4 git commands to generate.