projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-ctl: tracing_group memory leaks
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
lttng-ctl.c
diff --git
a/src/lib/lttng-ctl/lttng-ctl.c
b/src/lib/lttng-ctl/lttng-ctl.c
index 47887c0293645b61aa324e2164c10d86c1cc4b30..887d268efe909df2a0435fb7e00a16064c502656 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-2614,14
+2614,19
@@
end:
*/
int lttng_set_tracing_group(const char *name)
{
*/
int lttng_set_tracing_group(const char *name)
{
+ char *new_group;
if (name == NULL) {
return -LTTNG_ERR_INVALID;
}
if (name == NULL) {
return -LTTNG_ERR_INVALID;
}
- if (asprintf(&
tracing
_group, "%s", name) < 0) {
+ if (asprintf(&
new
_group, "%s", name) < 0) {
return -LTTNG_ERR_FATAL;
}
return -LTTNG_ERR_FATAL;
}
+ free(tracing_group);
+ tracing_group = new_group;
+ new_group = NULL;
+
return 0;
}
return 0;
}
This page took
0.023693 seconds
and
4
git commands to generate.