projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: fix: lttng-create: leaked command parameter
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
create.c
diff --git
a/src/bin/lttng/commands/create.c
b/src/bin/lttng/commands/create.c
index 5dc51b80f14afd10835faaf61e6a39d18edd512e..4ac8b87cad760896f22620264231a2c31d40a0c1 100644
(file)
--- a/
src/bin/lttng/commands/create.c
+++ b/
src/bin/lttng/commands/create.c
@@
-674,6
+674,11
@@
int cmd_create(int argc, const char **argv)
uint64_t v;
errno = 0;
uint64_t v;
errno = 0;
+ if (opt_arg) {
+ free(opt_arg);
+ opt_arg = NULL;
+ }
+
opt_arg = poptGetOptArg(pc);
if (!opt_arg) {
/* Set up default values. */
opt_arg = poptGetOptArg(pc);
if (!opt_arg) {
/* Set up default values. */
@@
-804,6
+809,7
@@
end:
/* Overwrite ret if an error occurred in create_session() */
ret = command_ret ? command_ret : ret;
/* Overwrite ret if an error occurred in create_session() */
ret = command_ret ? command_ret : ret;
+ free(opt_arg);
poptFreeContext(pc);
return ret;
}
poptFreeContext(pc);
return ret;
}
This page took
0.025122 seconds
and
4
git commands to generate.