X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fview.c;h=c2a3c217076b029eca78145d1d7fe84ebed3a0d1;hb=b12baf2e2a3f86f80835cf18629a1422a226db33;hp=adedf298966c0c7fad786f13bb34a66f4698a6de;hpb=77e132299cdfd783816593c6f68e2c75cbac7ec7;p=lttng-tools.git diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index adedf2989..c2a3c2170 100644 --- 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 */ - argv = malloc(sizeof(char *) * (num_opts + 2)); + argv = zmalloc(sizeof(char *) * (num_opts + 2)); 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. */ - argv = malloc(size); + argv = zmalloc(size); if (argv == NULL) { goto error; }