- ret = create_the_query_executor();
- if (ret) {
- /* create_the_query_executor() logs errors */
- goto end;
- }
-
- if (canceled) {
- BT_CLI_LOGW_APPEND_CAUSE(
- "Canceled by user before executing the query: "
- "comp-cls-addr=%p, comp-cls-name=\"%s\", "
- "query-obj=\"%s\"", comp_cls,
- bt_component_class_get_name(comp_cls), obj);
- *fail_reason = "canceled by user";
+ query_exec = bt_query_executor_create();
+ if (!query_exec) {
+ BT_CLI_LOGE_APPEND_CAUSE("Cannot create a query executor.");