+ if (opt_exclude) {
+ if (opt_event_type != LTTNG_EVENT_ALL && opt_event_type != LTTNG_EVENT_TRACEPOINT) {
+ ERR("Exclusion option can only be used with tracepoint events");
+ ret = CMD_ERROR;
+ goto error;
+ }
+ /* Free previously allocated items */
+ if (exclusion_list != NULL) {
+ while (exclusion_count--) {
+ free(exclusion_list[exclusion_count]);
+ }
+ free(exclusion_list);
+ exclusion_list = NULL;
+ }
+ /* Check for proper subsets */
+ ret = check_exclusion_subsets(event_name, opt_exclude,
+ &exclusion_count, &exclusion_list);
+ if (ret == CMD_ERROR) {
+ goto error;
+ }
+ }
+