projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: remove dead assignment in setup_channel_trace_path
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
session.c
diff --git
a/src/bin/lttng-relayd/session.c
b/src/bin/lttng-relayd/session.c
index af2278d46a2f318a91dbc2a5d28d57bed14f2f11..2f65848a9cedc2ed18bd56a630541b6922db8905 100644
(file)
--- a/
src/bin/lttng-relayd/session.c
+++ b/
src/bin/lttng-relayd/session.c
@@
-181,17
+181,21
@@
struct relay_session *session_create(const char *session_name,
int ret;
struct relay_session *session = NULL;
int ret;
struct relay_session *session = NULL;
- if (session_name && strstr(session_name, ".")) {
+ assert(session_name);
+ assert(hostname);
+ assert(base_path);
+
+ if (strstr(session_name, ".")) {
ERR("Illegal character in session name: \"%s\"",
session_name);
goto error;
}
ERR("Illegal character in session name: \"%s\"",
session_name);
goto error;
}
- if (
base_path &&
strstr(base_path, "../")) {
+ if (strstr(base_path, "../")) {
ERR("Invalid session base path walks up the path hierarchy: \"%s\"",
base_path);
goto error;
}
ERR("Invalid session base path walks up the path hierarchy: \"%s\"",
base_path);
goto error;
}
- if (
hostname &&
strstr(hostname, ".")) {
+ if (strstr(hostname, ".")) {
ERR("Invalid character in hostname: \"%s\"",
hostname);
goto error;
ERR("Invalid character in hostname: \"%s\"",
hostname);
goto error;
@@
-389,6
+393,9
@@
void session_release(struct urcu_ref *ref)
void session_put(struct relay_session *session)
{
void session_put(struct relay_session *session)
{
+ if (!session) {
+ return;
+ }
rcu_read_lock();
urcu_ref_put(&session->ref, session_release);
rcu_read_unlock();
rcu_read_lock();
urcu_ref_put(&session->ref, session_release);
rcu_read_unlock();
This page took
0.02869 seconds
and
4
git commands to generate.