projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix: check malloc return value
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
list.c
diff --git
a/src/bin/lttng/commands/list.c
b/src/bin/lttng/commands/list.c
index 87935393edabbe076628d11a8a1f78c818225309..f56adf4821db71ca4d8d4f77bc7adabd36444302 100644
(file)
--- a/
src/bin/lttng/commands/list.c
+++ b/
src/bin/lttng/commands/list.c
@@
-117,6
+117,10
@@
static char *get_cmdline_by_pid(pid_t pid)
/* Caller must free() *cmdline */
cmdline = malloc(PATH_MAX);
+ if (!cmdline) {
+ perror("malloc cmdline");
+ goto end;
+ }
ret = fread(cmdline, 1, PATH_MAX, fp);
if (ret < 0) {
perror("fread proc list");
This page took
0.023512 seconds
and
4
git commands to generate.