[PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Check return value of malloc() and fail if error. Now read_string() can return NULL also check its return value and bail out. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 100

[PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim namhyung@lge.com Check return value of malloc() and fail if error. Now read_string() can return NULL also check its return value and bail out. Cc: Steven Rostedt rost...@goodmis.org Cc: Frederic Weisbecker fweis...@gmail.com Signed-off-by: Namhyung Kim namhy...@kernel.org

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-20 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 19, 2013 at 11:13:25PM -0400, Steven Rostedt escreveu: > On Wed, 2013-03-20 at 12:00 +0900, Namhyung Kim wrote: > > On Tue, 19 Mar 2013 21:55:02 -0400, Steven Rostedt wrote: > > > On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: > > >> On Tue, 19 Mar 2013 10:50:02 -0400, Steven

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-20 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 19, 2013 at 11:13:25PM -0400, Steven Rostedt escreveu: On Wed, 2013-03-20 at 12:00 +0900, Namhyung Kim wrote: On Tue, 19 Mar 2013 21:55:02 -0400, Steven Rostedt wrote: On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Steven Rostedt
On Wed, 2013-03-20 at 12:00 +0900, Namhyung Kim wrote: > On Tue, 19 Mar 2013 21:55:02 -0400, Steven Rostedt wrote: > > On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: > >> On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: > >> > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote:

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 21:55:02 -0400, Steven Rostedt wrote: > On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: >> On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: >> > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: >> >> free(version); >> >> @@ -331,11 +354,12 @@ ssize_t

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Steven Rostedt
On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: > On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: > > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: > >>free(version); > >> @@ -331,11 +354,12 @@ ssize_t trace_report(int fd, struct pevent > >> **ppevent, bool __repipe)

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: >> free(version); >> @@ -331,11 +354,12 @@ ssize_t trace_report(int fd, struct pevent **ppevent, >> bool __repipe) >> >> page_size = read4(pevent); >> >> -

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Steven Rostedt
On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: > free(version); > @@ -331,11 +354,12 @@ ssize_t trace_report(int fd, struct pevent **ppevent, > bool __repipe) > > page_size = read4(pevent); > > - read_header_files(pevent); > - read_ftrace_files(pevent); > -

[PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Check return value of malloc() and fail if error. Now read_string() can return NULL also check its return value and bail out. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 90

[PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim namhyung@lge.com Check return value of malloc() and fail if error. Now read_string() can return NULL also check its return value and bail out. Cc: Steven Rostedt rost...@goodmis.org Cc: Frederic Weisbecker fweis...@gmail.com Signed-off-by: Namhyung Kim namhy...@kernel.org

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Steven Rostedt
On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: free(version); @@ -331,11 +354,12 @@ ssize_t trace_report(int fd, struct pevent **ppevent, bool __repipe) page_size = read4(pevent); - read_header_files(pevent); - read_ftrace_files(pevent); -

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: free(version); @@ -331,11 +354,12 @@ ssize_t trace_report(int fd, struct pevent **ppevent, bool __repipe) page_size = read4(pevent); -

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Steven Rostedt
On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: free(version); @@ -331,11 +354,12 @@ ssize_t trace_report(int fd, struct pevent **ppevent, bool __repipe)

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 21:55:02 -0400, Steven Rostedt wrote: On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: free(version); @@ -331,11 +354,12 @@ ssize_t trace_report(int

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Steven Rostedt
On Wed, 2013-03-20 at 12:00 +0900, Namhyung Kim wrote: On Tue, 19 Mar 2013 21:55:02 -0400, Steven Rostedt wrote: On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: