projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: consumer: dangling chunk on buffer allocation failure
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-app.c
diff --git
a/src/bin/lttng-sessiond/ust-app.c
b/src/bin/lttng-sessiond/ust-app.c
index 205fdad16684da05e2beb427992d5b5402b1e37a..41f201c48bb4ef8ea31b8c318c1ae95f2c4b434a 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.c
+++ b/
src/bin/lttng-sessiond/ust-app.c
@@
-45,6
+45,10
@@
#include "notification-thread-commands.h"
#include "rotate.h"
#include "notification-thread-commands.h"
#include "rotate.h"
+struct lttng_ht *ust_app_ht;
+struct lttng_ht *ust_app_ht_by_sock;
+struct lttng_ht *ust_app_ht_by_notify_sock;
+
static
int ust_app_flush_app_session(struct ust_app *app, struct ust_app_session *ua_sess);
static
int ust_app_flush_app_session(struct ust_app *app, struct ust_app_session *ua_sess);
@@
-4118,11
+4122,14
@@
int ust_app_channel_create(struct ltt_ust_session *usess,
ret = ust_app_channel_allocate(ua_sess, uchan,
LTTNG_UST_CHAN_PER_CPU, usess,
&ua_chan);
ret = ust_app_channel_allocate(ua_sess, uchan,
LTTNG_UST_CHAN_PER_CPU, usess,
&ua_chan);
- if (ret == 0) {
- ret = ust_app_channel_send(app, usess,
- ua_sess, ua_chan);
- } else {
- goto end;
+ if (ret < 0) {
+ goto error;
+ }
+
+ ret = ust_app_channel_send(app, usess,
+ ua_sess, ua_chan);
+ if (ret) {
+ goto error;
}
/* Add contexts. */
}
/* Add contexts. */
@@
-4130,10
+4137,12
@@
int ust_app_channel_create(struct ltt_ust_session *usess,
ret = create_ust_app_channel_context(ua_chan,
&uctx->ctx, app);
if (ret) {
ret = create_ust_app_channel_context(ua_chan,
&uctx->ctx, app);
if (ret) {
- goto e
nd
;
+ goto e
rror
;
}
}
}
}
}
}
+
+error:
if (ret < 0) {
switch (ret) {
case -ENOTCONN:
if (ret < 0) {
switch (ret) {
case -ENOTCONN:
@@
-4149,7
+4158,7
@@
int ust_app_channel_create(struct ltt_ust_session *usess,
break;
}
}
break;
}
}
-end:
+
if (ret == 0 && _ua_chan) {
/*
* Only return the application's channel on success. Note
if (ret == 0 && _ua_chan) {
/*
* Only return the application's channel on success. Note
This page took
0.024081 seconds
and
4
git commands to generate.