projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix relayd: session leaked on communication error during creation
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index 09aeb33e0120b4be549a44934efb2f104b4474a9..e81bdeffc82b97790ddf99bf6bb473636b0f4064 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-1099,7
+1099,7
@@
static int relay_create_session(const struct lttcomm_relayd_hdr *recv_hdr,
{
int ret = 0;
ssize_t send_ret;
{
int ret = 0;
ssize_t send_ret;
- struct relay_session *session;
+ struct relay_session *session
= NULL
;
struct lttcomm_relayd_status_session reply;
char session_name[LTTNG_NAME_MAX];
char hostname[LTTNG_HOST_NAME_MAX];
struct lttcomm_relayd_status_session reply;
char session_name[LTTNG_NAME_MAX];
char hostname[LTTNG_HOST_NAME_MAX];
@@
-1153,7
+1153,9
@@
send_reply:
send_ret);
ret = -1;
}
send_ret);
ret = -1;
}
-
+ if (ret < 0 && session) {
+ session_put(session);
+ }
return ret;
}
return ret;
}
@@
-2973,7
+2975,7
@@
int relay_rotate_pending(const struct lttcomm_relayd_hdr *recv_hdr,
rotate_pending = true;
DBG("Stream %" PRIu64 " is still rotating",
stream->stream_handle);
rotate_pending = true;
DBG("Stream %" PRIu64 " is still rotating",
stream->stream_handle);
- } else if (stream->current_chunk_id.value < chunk_id) {
+ } else if (stream->current_chunk_id.value <
=
chunk_id) {
/*
* Stream closed on the consumer but still active on the
* relay.
/*
* Stream closed on the consumer but still active on the
* relay.
This page took
0.023886 seconds
and
4
git commands to generate.