projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: Replace all perror() uses by the PERROR macro
[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 cb4b5074361ebbfe62cbbb83e01812353430b613..e1e1564c16ebe9f0e3650a27ac80eac1d7c34638 100644
(file)
--- a/
src/bin/lttng/commands/view.c
+++ b/
src/bin/lttng/commands/view.c
@@
-173,6
+173,13
@@
static char **alloc_argv_from_user_opts(char *opts, const char *trace_path)
return argv;
error:
return argv;
error:
+ if (argv) {
+ for (i = 0; i < num_opts + 2; i++) {
+ free(argv[i]);
+ }
+ free(argv);
+ }
+
return NULL;
}
return NULL;
}
@@
-309,14
+316,14
@@
static char *build_live_path(char *session_name)
ret = gethostname(hostname, sizeof(hostname));
if (ret < 0) {
ret = gethostname(hostname, sizeof(hostname));
if (ret < 0) {
-
perror
("gethostname");
+
PERROR
("gethostname");
goto error;
}
ret = asprintf(&path, "net://localhost/host/%s/%s", hostname,
session_name);
if (ret < 0) {
goto error;
}
ret = asprintf(&path, "net://localhost/host/%s/%s", hostname,
session_name);
if (ret < 0) {
-
perror
("asprintf live path");
+
PERROR
("asprintf live path");
goto error;
}
goto error;
}
This page took
0.023961 seconds
and
4
git commands to generate.