ret = add_event_ust_registry(sock, sobjd, cobjd, name, sig, nr_fields,
fields, loglevel, model_emf_uri);
if (ret < 0) {
+ free(sig);
+ free(model_emf_uri);
+ free(fields);
goto error;
}
ret = reply_ust_register_channel(sock, sobjd, cobjd, nr_fields,
fields);
if (ret < 0) {
+ free(fields);
goto error;
}
call_rcu(&obj->head, close_notify_sock_rcu);
}
}
+
+/*
+ * Destroy a ust app data structure and free its memory.
+ */
+void ust_app_destroy(struct ust_app *app)
+{
+ if (!app) {
+ return;
+ }
+
+ call_rcu(&app->pid_n.head, delete_ust_app_rcu);
+}