projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: memory leak in sessiond command in error path
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index 9527371380e02c45011ad60a0f806872e194a861..2cb8f5a23e77b267b37dc513d5dccb8bdc994c40 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-2895,6
+2895,7
@@
skip_domain:
ret = setup_lttng_msg(cmd_ctx, nb_dom * sizeof(struct lttng_domain));
if (ret < 0) {
ret = setup_lttng_msg(cmd_ctx, nb_dom * sizeof(struct lttng_domain));
if (ret < 0) {
+ free(domains);
goto setup_error;
}
goto setup_error;
}
@@
-2922,6
+2923,7
@@
skip_domain:
ret = setup_lttng_msg(cmd_ctx, nb_chan * sizeof(struct lttng_channel));
if (ret < 0) {
ret = setup_lttng_msg(cmd_ctx, nb_chan * sizeof(struct lttng_channel));
if (ret < 0) {
+ free(channels);
goto setup_error;
}
goto setup_error;
}
@@
-2949,6
+2951,7
@@
skip_domain:
ret = setup_lttng_msg(cmd_ctx, nb_event * sizeof(struct lttng_event));
if (ret < 0) {
ret = setup_lttng_msg(cmd_ctx, nb_event * sizeof(struct lttng_event));
if (ret < 0) {
+ free(events);
goto setup_error;
}
goto setup_error;
}
This page took
0.023623 seconds
and
4
git commands to generate.