projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: test: lttng kernel modules still loaded after running test_clock_override
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
snapshot.cpp
diff --git
a/src/bin/lttng/commands/snapshot.cpp
b/src/bin/lttng/commands/snapshot.cpp
index a5cbbfe759f5c16c25ea0a87bf8789a8e9627576..583714d101e347c410644a3ac654ece57bf3d68a 100644
(file)
--- a/
src/bin/lttng/commands/snapshot.cpp
+++ b/
src/bin/lttng/commands/snapshot.cpp
@@
-15,11
+15,11
@@
#include <sys/types.h>
#include <unistd.h>
#include <sys/types.h>
#include <unistd.h>
-#include <common/utils.h>
-#include <common/mi-lttng.h>
+#include <common/utils.h
pp
>
+#include <common/mi-lttng.h
pp
>
#include <lttng/lttng.h>
#include <lttng/lttng.h>
-#include "../command.h"
+#include "../command.h
pp
"
static const char *opt_session_name;
static const char *opt_output_name;
static const char *opt_session_name;
static const char *opt_output_name;
@@
-623,9
+623,12
@@
int cmd_snapshot(int argc, const char **argv)
case OPT_MAX_SIZE:
{
uint64_t val;
case OPT_MAX_SIZE:
{
uint64_t val;
- const char *max_size_arg = poptGetOptArg(pc);
+ char *max_size_arg = poptGetOptArg(pc);
+ const int parse_ret = utils_parse_size_suffix(
+ (char *) max_size_arg, &val);
- if (utils_parse_size_suffix((char *) max_size_arg, &val) < 0) {
+ free(max_size_arg);
+ if (parse_ret < 0) {
ERR("Unable to handle max-size value %s",
max_size_arg);
cmd_ret = CMD_ERROR;
ERR("Unable to handle max-size value %s",
max_size_arg);
cmd_ret = CMD_ERROR;
This page took
0.025449 seconds
and
4
git commands to generate.