plugin_description ? plugin_description : "None");
printf_verbose("\tcomponent description: %s\n",
component_description ? component_description : "None");
+
+ bt_put(plugin);
+ bt_put(component_class);
}
}
goto end;
}
- factory->current_plugin = plugin;
- component_status = bt_plugin_register_component_classes(plugin,
- factory);
- factory->current_plugin = NULL;
+ BT_MOVE(factory->current_plugin, plugin);
+ component_status = bt_plugin_register_component_classes(
+ factory->current_plugin, factory);
+ BT_PUT(factory->current_plugin);
if (component_status != BT_COMPONENT_STATUS_OK) {
switch (component_status) {
case BT_COMPONENT_STATUS_NOMEM:
break;
}
- BT_PUT(plugin);
goto end;
}
end:
if (type != BT_COMPONENT_TYPE_UNKNOWN) {
if (type != bt_component_class_get_type(
component_class)) {
+ bt_put(plugin);
continue;
}
}
assert(cur_plugin_name);
if (strcmp(plugin_name, cur_plugin_name)) {
+ bt_put(plugin);
continue;
}
}
assert(cur_cc_name);
if (strcmp(component_name, cur_cc_name)) {
+ bt_put(plugin);
continue;
}
}
+ bt_put(plugin);
/* All criteria met. */
goto match;
}
}
bt_object_init(component, bt_component_destroy);
- component->class = bt_get(component_class);
component->name = g_string_new(name);
if (!component->name) {
BT_PUT(component);