Fix writer: missing put ref to values and types
[babeltrace.git] / plugins / writer / writer.c
index 6d06468f83f3fe84b29593590b3021d0fcc1cb00..f89ac7460a80f56e5d5f5eba0c48f972bc2b4519 100644 (file)
 
 #include <babeltrace/ctf-ir/packet.h>
 #include <babeltrace/plugin/plugin-dev.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/component-sink.h>
-#include <babeltrace/component/private-component-sink.h>
-#include <babeltrace/component/private-port.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/event.h>
-#include <babeltrace/component/notification/packet.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/component-sink.h>
+#include <babeltrace/graph/private-component-sink.h>
+#include <babeltrace/graph/private-port.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/notification-event.h>
+#include <babeltrace/graph/notification-packet.h>
 #include <plugins-common.h>
 #include <stdio.h>
 #include <stdbool.h>
@@ -57,7 +57,7 @@ void destroy_writer_component_data(struct writer_component *writer_component)
 }
 
 static
-void destroy_writer_component(struct bt_private_component *component)
+void finalize_writer_component(struct bt_private_component *component)
 {
        struct writer_component *writer_component = (struct writer_component *)
                bt_private_component_get_user_data(component);
@@ -272,6 +272,7 @@ enum bt_component_status writer_component_init(
                ret = BT_COMPONENT_STATUS_INVALID;
                goto error;
        }
+       bt_put(value);
 
        writer_component->base_path = g_string_new(path);
        if (!writer_component) {
@@ -301,5 +302,5 @@ BT_PLUGIN_SINK_COMPONENT_CLASS(writer, run);
 BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(writer, writer_component_init);
 BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(writer,
                writer_component_accept_port_connection);
-BT_PLUGIN_SINK_COMPONENT_CLASS_DESTROY_METHOD(writer, destroy_writer_component);
+BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(writer, finalize_writer_component);
 BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(writer, "Formats CTF-IR to CTF.");
This page took 0.023509 seconds and 4 git commands to generate.