}
component = container_of(obj, struct bt_component, base);
-
- assert(component->destroy);
component_class = component->class;
/*
component->user_destroy(component->user_data);
}
- component->destroy(component);
+ if (component->destroy) {
+ component->destroy(component);
+ }
+
g_string_free(component->name, TRUE);
bt_put(component_class);
g_free(component);
{
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
- if (!component || !destroy) {
+ if (!component) {
ret = BT_COMPONENT_STATUS_INVALID;
goto end;
}