diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-09-21 16:11:28 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-09-22 12:51:55 -0400 |
commit | 3d099b4fc751b3f62d77bcd902c1defac8c3889f (patch) | |
tree | 869ac20a2d4c2d334b5d5bc233ba432618066d52 | |
parent | aaaaf69ba76310abfa150f48784006cd1079ccf8 (diff) | |
download | trace-cmd-3d099b4fc751b3f62d77bcd902c1defac8c3889f.tar.gz |
trace-cmd: Remove malloc_or_die() from trace-recorder.c
The two places tha used malloc_or_die() already checked the return of the
call and failed appropriately if it did not succeed. No need to die.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-recorder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/trace-recorder.c b/trace-recorder.c index 66cad986..7e637d36 100644 --- a/trace-recorder.c +++ b/trace-recorder.c @@ -116,7 +116,7 @@ tracecmd_create_buffer_recorder_fd2(int fd, int fd2, int cpu, unsigned flags, char *path = NULL; int ret; - recorder = malloc_or_die(sizeof(*recorder)); + recorder = malloc(sizeof(*recorder)); if (!recorder) return NULL; @@ -155,7 +155,7 @@ tracecmd_create_buffer_recorder_fd2(int fd, int fd2, int cpu, unsigned flags, recorder->fd1 = fd; recorder->fd2 = fd2; - path = malloc_or_die(strlen(buffer) + 40); + path = malloc(strlen(buffer) + 40); if (!path) goto out_free; |