+ struct details_comp *details_comp;
+ bt_self_component *self_comp =
+ bt_self_component_sink_as_self_component(comp);
+ bt_logging_level log_level =
+ bt_component_get_logging_level(
+ bt_self_component_as_component(self_comp));
+
+ details_comp = create_details_comp(comp);
+ if (!details_comp) {
+ /*
+ * Don't use BT_COMP_LOGE_APPEND_CAUSE, as `details_comp` is not
+ * initialized yet.
+ */
+ BT_COMP_LOG_CUR_LVL(BT_LOG_ERROR, log_level, self_comp,
+ "Failed to allocate component.");
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_COMPONENT(
+ self_comp, "Failed to allocate component.");
+ status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_MEMORY_ERROR;
+ goto error;
+ }