Skip to content

Commit

Permalink
perf tests: Check for mkstemp return value in dso-data test
Browse files Browse the repository at this point in the history
Adding check for mkstemp return error value in dso-data test.

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1352508412-16914-13-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Nov 14, 2012
1 parent c81251e commit f95e081
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/perf/tests/dso-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ static char *test_file(int size)
unsigned char *buf;

fd = mkstemp(templ);
if (fd < 0) {
perror("mkstemp failed");
return NULL;
}

buf = malloc(size);
if (!buf) {
Expand Down

0 comments on commit f95e081

Please sign in to comment.