projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: use zmalloc() in lttng view.c
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
view.c
diff --git
a/src/bin/lttng/commands/view.c
b/src/bin/lttng/commands/view.c
index adedf298966c0c7fad786f13bb34a66f4698a6de..c2a3c217076b029eca78145d1d7fe84ebed3a0d1 100644
(file)
--- a/
src/bin/lttng/commands/view.c
+++ b/
src/bin/lttng/commands/view.c
@@
-151,7
+151,7
@@
static char **alloc_argv_from_user_opts(char *opts, const char *trace_path)
} while (*token != '\0');
/* Add two here for the NULL terminating element and trace path */
} while (*token != '\0');
/* Add two here for the NULL terminating element and trace path */
- argv = malloc(sizeof(char *) * (num_opts + 2));
+ argv =
z
malloc(sizeof(char *) * (num_opts + 2));
if (argv == NULL) {
goto error;
}
if (argv == NULL) {
goto error;
}
@@
-198,7
+198,7
@@
static char **alloc_argv_from_local_opts(const char **opts, size_t opts_len,
size = sizeof(char *) * mem_len;
/* Add two here for the trace_path and the NULL terminating element. */
size = sizeof(char *) * mem_len;
/* Add two here for the trace_path and the NULL terminating element. */
- argv = malloc(size);
+ argv =
z
malloc(size);
if (argv == NULL) {
goto error;
}
if (argv == NULL) {
goto error;
}
This page took
0.022653 seconds
and
4
git commands to generate.