Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752291Ab2KROgb (ORCPT ); Sun, 18 Nov 2012 09:36:31 -0500 Received: from merlin.infradead.org ([205.233.59.134]:36567 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157Ab2KROaQ (ORCPT ); Sun, 18 Nov 2012 09:30:16 -0500 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Corey Ashford , Frederic Weisbecker , Ingo Molnar , Paul Mackerras , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 12/32] perf tests: Check for mkstemp return value in dso-data test Date: Sun, 18 Nov 2012 11:29:37 -0300 Message-Id: <1353248997-30763-13-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.7.9.2.358.g22243 In-Reply-To: <1353248997-30763-1-git-send-email-acme@infradead.org> References: <1353248997-30763-1-git-send-email-acme@infradead.org> Content-Type: text/plain; charset="utf-8" X-SRS-Rewrite: SMTP reverse-path rewritten from by canuck.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1266 Lines: 40 From: Jiri Olsa Adding check for mkstemp return error value in dso-data test. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: Corey Ashford Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1352508412-16914-13-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/dso-data.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index b5198f5..5eaffa2 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) unsigned char *buf; fd = mkstemp(templ); + if (fd < 0) { + perror("mkstemp failed"); + return NULL; + } buf = malloc(size); if (!buf) { -- 1.7.9.2.358.g22243 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/