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 a4fea821a07d35cb45670879cbab3ad2d00da711..8c314ec1c9688d5df77c1eefc8fa047988e0d474 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.c
+++ b/
src/bin/lttng-sessiond/ust-app.c
@@
-4112,11
+4112,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. */
@@
-4124,10
+4127,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:
@@
-4143,7
+4148,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.026703 seconds
and
5
git commands to generate.