if (ua_sess == NULL) {
/* The malloc() failed. */
ret = -1;
- goto error;
+ goto error_rcu_unlock;
} else if (ua_sess == (void *) -1UL) {
/* The application's socket is not valid. Contiuing */
ret = -1;
if (ua_chan == NULL) {
/* Major problem here and it's maybe the tracer or malloc() */
ret = -1;
- goto error;
+ goto error_rcu_unlock;
}
}
+error_rcu_unlock:
rcu_read_unlock();
-
-error:
return ret;
}
/*
* Destroy a specific UST session in apps.
*/
-int ust_app_destroy_trace(struct ltt_ust_session *usess, struct ust_app *app)
+static int destroy_trace(struct ltt_ust_session *usess, struct ust_app *app)
{
struct ust_app_session *ua_sess;
struct lttng_ust_object_data obj;
rcu_read_lock();
cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
- ret = ust_app_destroy_trace(usess, app);
+ ret = destroy_trace(usess, app);
if (ret < 0) {
/* Continue to next apps even on error */
continue;
struct ust_app_event *ua_event;
struct ust_app_ctx *ua_ctx;
- if (usess == NULL) {
- ERR("No UST session on global update. Returning");
- goto error;
- }
+ assert(usess);
DBG2("UST app global update for app sock %d for session id %d", sock,
usess->id);