diff options
-rw-r--r-- | tools/perf/tests/dso-data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index b5198f52c24a..5eaffa2de9c5 100644 --- a/tools/perf/tests/dso-data.c +++ b/tools/perf/tests/dso-data.c | |||
@@ -26,6 +26,10 @@ static char *test_file(int size) | |||
26 | unsigned char *buf; | 26 | unsigned char *buf; |
27 | 27 | ||
28 | fd = mkstemp(templ); | 28 | fd = mkstemp(templ); |
29 | if (fd < 0) { | ||
30 | perror("mkstemp failed"); | ||
31 | return NULL; | ||
32 | } | ||
29 | 33 | ||
30 | buf = malloc(size); | 34 | buf = malloc(size); |
31 | if (!buf) { | 35 | if (!buf) { |