projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
channel_new_default_attr: fix usage memory leaks
[lttng-tools.git]
/
lttng-sessiond
/
main.c
diff --git
a/lttng-sessiond/main.c
b/lttng-sessiond/main.c
index ae994d7e551956200265e5450e494627a376105c..9af001dfd63d3de910d8de5f14a6beca4872f334 100644
(file)
--- a/
lttng-sessiond/main.c
+++ b/
lttng-sessiond/main.c
@@
-2474,8
+2474,10
@@
static int cmd_enable_event(struct ltt_session *session, int domain,
ret = channel_kernel_create(session->kernel_session,
attr, kernel_poll_pipe[1]);
if (ret != LTTCOMM_OK) {
ret = channel_kernel_create(session->kernel_session,
attr, kernel_poll_pipe[1]);
if (ret != LTTCOMM_OK) {
+ free(attr);
goto error;
}
goto error;
}
+ free(attr);
}
/* Get the newly created kernel channel pointer */
}
/* Get the newly created kernel channel pointer */
@@
-2516,6
+2518,7
@@
static int cmd_enable_event(struct ltt_session *session, int domain,
/* Use the internal command enable channel */
ret = cmd_enable_channel(session, domain, attr);
if (ret < 0) {
/* Use the internal command enable channel */
ret = cmd_enable_channel(session, domain, attr);
if (ret < 0) {
+ free(attr);
goto error;
}
goto error;
}
This page took
0.024082 seconds
and
4
git commands to generate.