Make bt_private_component_*_add_*_port() return a status code
[babeltrace.git] / plugins / lttng-utils / plugin.c
index 60466325ba989fd4083f263e1ae8f8b705c49efe..fb00dee315b64ee4c650fa6357a7233fd3cb2c11 100644 (file)
@@ -165,7 +165,6 @@ struct bt_notification *handle_notification(FILE *err,
                                writer_packet);
                assert(new_notification);
                bt_put(packet);
-               bt_put(writer_packet);
                break;
        }
        case BT_NOTIFICATION_TYPE_EVENT:
@@ -441,7 +440,6 @@ enum bt_component_status debug_info_component_init(
 {
        enum bt_component_status ret;
        struct debug_info_component *debug_info = create_debug_info_component_data();
-       struct bt_private_port *priv_port = NULL;
 
        if (!debug_info) {
                ret = BT_COMPONENT_STATUS_NOMEM;
@@ -453,21 +451,17 @@ enum bt_component_status debug_info_component_init(
                goto error;
        }
 
-       priv_port = bt_private_component_filter_add_input_private_port(
-               component, "in", NULL);
-       if (!priv_port) {
-               ret = BT_COMPONENT_STATUS_ERROR;
+       ret = bt_private_component_filter_add_input_private_port(
+               component, "in", NULL, NULL);
+       if (ret != BT_COMPONENT_STATUS_OK) {
                goto end;
        }
-       BT_PUT(priv_port);
 
-       priv_port = bt_private_component_filter_add_output_private_port(
-               component, "out", NULL);
-       if (!priv_port) {
-               ret = BT_COMPONENT_STATUS_ERROR;
+       ret = bt_private_component_filter_add_output_private_port(
+               component, "out", NULL, NULL);
+       if (ret != BT_COMPONENT_STATUS_OK) {
                goto end;
        }
-       BT_PUT(priv_port);
 
        ret = init_from_params(debug_info, params);
 end:
This page took 0.023455 seconds and 4 git commands to generate.