Component creation
[babeltrace.git] / plugins / source.c
index 2dba33bd432a6bf958ffbf619d3d1af4c11f2e9a..6e76206afb6e00c26627e044d44df098aba08eaf 100644 (file)
@@ -52,6 +52,7 @@ struct bt_component *bt_component_source_create(
 {
        struct bt_component_source *source = NULL;
        enum bt_component_status ret;
+
        source = g_new0(struct bt_component_source, 1);
        if (!source) {
                goto end;
@@ -60,15 +61,14 @@ struct bt_component *bt_component_source_create(
        ret = bt_component_init(&source->parent, class, name,
                bt_component_source_destroy);
        if (ret != BT_COMPONENT_STATUS_OK) {
-               g_free(source);
-               source = NULL;
+               BT_PUT(source);
                goto end;
        }
 end:
        return source ? &source->parent : NULL;
 }
 
-struct bt_notification_iterator *bt_plugin_source_create_iterator(
+struct bt_notification_iterator *bt_component_source_create_iterator(
                struct bt_component *component)
 {
        enum bt_component_status ret_component;
This page took 0.02405 seconds and 4 git commands to generate.