Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
return g_new0(struct text_component, 1);
}
return g_new0(struct text_component, 1);
}
-static void destroy_text(void *data)
+static
+void destroy_text_data(struct text_component *data)
+static void destroy_text(struct bt_component *component)
+{
+ void *data = bt_component_get_private_data(component);
+
+ destroy_text_data(data);
+}
+
static
enum bt_component_status handle_notification(struct bt_component *component,
struct bt_notification *notification)
static
enum bt_component_status handle_notification(struct bt_component *component,
struct bt_notification *notification)
}
ret = bt_component_sink_set_handle_notification_cb(component,
}
ret = bt_component_sink_set_handle_notification_cb(component,
if (ret != BT_COMPONENT_STATUS_OK) {
goto error;
}
end:
return ret;
error:
if (ret != BT_COMPONENT_STATUS_OK) {
goto error;
}
end:
return ret;
error:
+ destroy_text_data(text);
/* Initialize plug-in entry points. */
BT_PLUGIN_NAME("ctf-text");
BT_PLUGIN_DESCRIPTION("Babeltrace text output plug-in.");
/* Initialize plug-in entry points. */
BT_PLUGIN_NAME("ctf-text");
BT_PLUGIN_DESCRIPTION("Babeltrace text output plug-in.");