end:
rcu_read_unlock();
+ if (session) {
+ session_put(session);
+ }
}
/*
int ret;
struct buffer_reg_uid *reg_uid;
struct buffer_reg_channel *reg_chan;
- struct ltt_session *session;
+ struct ltt_session *session = NULL;
enum lttng_error_code notification_ret;
struct ust_registry_channel *chan_reg;
}
error:
+ if (session) {
+ session_put(session);
+ }
return ret;
}
int ret;
struct ust_registry_session *registry;
enum lttng_error_code cmd_ret;
- struct ltt_session *session;
+ struct ltt_session *session = NULL;
uint64_t chan_reg_key;
struct ust_registry_channel *chan_reg;
}
error:
rcu_read_unlock();
+ if (session) {
+ session_put(session);
+ }
return ret;
}
struct ust_app_channel *metadata;
struct consumer_socket *socket;
struct ust_registry_session *registry;
- struct ltt_session *session;
+ struct ltt_session *session = NULL;
assert(ua_sess);
assert(app);
delete_ust_app_channel(-1, metadata, app);
error:
pthread_mutex_unlock(®istry->lock);
+ if (session) {
+ session_put(session);
+ }
return ret;
}
struct lttng_ht_iter iter;
struct ust_app *app;
char pathname[PATH_MAX];
- struct ltt_session *session;
+ struct ltt_session *session = NULL;
uint64_t trace_archive_id;
assert(usess);
error:
rcu_read_unlock();
+ if (session) {
+ session_put(session);
+ }
return status;
}