projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Possible call to execvp with NULL argument on allocation failure
[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 12499ee408f1e545b3afbe727f2b0c3659a23082..aaa8f47a9ec4b157e44ca68fe9b4e0a9d712f161 100644
(file)
--- a/
src/bin/lttng/commands/list.c
+++ b/
src/bin/lttng/commands/list.c
@@
-16,6
+16,7
@@
*/
#define _GNU_SOURCE
*/
#define _GNU_SOURCE
+#define _LGPL_SOURCE
#include <inttypes.h>
#include <popt.h>
#include <stdio.h>
#include <inttypes.h>
#include <popt.h>
#include <stdio.h>
@@
-128,14
+129,14
@@
static char *get_cmdline_by_pid(pid_t pid)
}
/* Caller must free() *cmdline */
}
/* Caller must free() *cmdline */
- cmdline = malloc(PATH_MAX);
+ cmdline =
z
malloc(PATH_MAX);
if (!cmdline) {
if (!cmdline) {
-
perror
("malloc cmdline");
+
PERROR
("malloc cmdline");
goto end;
}
ret = fread(cmdline, 1, PATH_MAX, fp);
if (ret < 0) {
goto end;
}
ret = fread(cmdline, 1, PATH_MAX, fp);
if (ret < 0) {
-
perror
("fread proc list");
+
PERROR
("fread proc list");
}
end:
}
end:
This page took
0.082984 seconds
and
4
git commands to generate.