+ if (use_action_list) {
+ struct lttng_action *notify, *group;
+
+ group = lttng_action_list_create();
+ if (!group) {
+ printf("error: Could not create action list\n");
+ ret = 1;
+ goto end;
+ }
+
+ notify = lttng_action_notify_create();
+ if (!notify) {
+ lttng_action_destroy(group);
+ printf("error: Could not create action notify\n");
+ ret = 1;
+ goto end;
+ }
+
+ action_status = lttng_action_list_add_action(group, notify);
+ if (action_status != LTTNG_ACTION_STATUS_OK) {
+ printf("error: Could not add action notify to action list\n");
+ lttng_action_destroy(group);
+ lttng_action_destroy(notify);
+ ret = 1;
+ goto end;
+ }
+
+ action = group;
+ } else {
+ action = lttng_action_notify_create();
+ if (!action) {
+ printf("error: Could not create action notify\n");
+ ret = 1;
+ goto end;
+ }