Message ID | 20190709183126.30257-6-acme@kernel.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp8896352ilk; Tue, 9 Jul 2019 11:32:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPHLHKml/yViyV4k2RqzH8V+aOi97PJc5apBYY+ZMu/wx3+SUSIMz5LbbsTBlhmhQ7AHgk X-Received: by 2002:a63:5212:: with SMTP id g18mr31018034pgb.387.1562697131813; Tue, 09 Jul 2019 11:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562697131; cv=none; d=google.com; s=arc-20160816; b=01TTC51iERbr6w0wUhGtr3ubnxcLISF4n8Kr8W1x+67wEq4/M/SPPWFuDYP9Z9ZvaB SreAGMCIKxPOrtLCuV1YVf6z8oUOi94itVPp7qprfsWcvExjqT2lq79bV9Gbd7Fhv3HX skeO7i7TLn6aq8h3xQtIT1h6ffYWdJGEUUKglynROWqar3EUrIDreQLmo7S6DYAxmzt6 u+ewYOkBuXuw6UTdx3VPkgsz7soQXP9CTcUGvnziSpQhAtdhiy0Uo7cmrfkVi0xBjwQM Ng6NHqJUSdQOZBOHZSca/1NCRQp90DPFR0CoIGLvMjMCuSVqd9I4QUvI8aN4TQvTK6Ru n1tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yThV/wsDbOO7z0W8p5jy900zA1BoiaC/u+pr+N5bygA=; b=LwMKaKWcmbmrUop2KdWA17Qq3CUXVrIufvfeOTiPHlKZ2sc6AfzTO+zh1+haLSf/DL uIKtXgfzDzIChcmd8+bNgxVISCHVDd7xmmQc+kHbrYTpI3fGOhNpyjCn9keaACiYRQLb UlbN9LJZT8cFQHmpaOZW13dBgnv90Yi5fzL0TwcP9cu7xGSpBqstbPYJ+Rtazf/VvjX0 zqx8n7feSheYPf/HwTqgTcV9Ib8vMsEDqcGQbqYY3etHpBNxtbMnkH68mRGqi2h7NSex wz1SWW6EgG/woIKFcttFjyNukssf2enirlHojdXOlODEVzzXw32qWEP1xX8amytpmjwH xB2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R5NqjC4s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u185si20804361pgd.561.2019.07.09.11.32.11; Tue, 09 Jul 2019 11:32:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R5NqjC4s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729079AbfGIScK (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Tue, 9 Jul 2019 14:32:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:53464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726592AbfGIScJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 9 Jul 2019 14:32:09 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.35.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CFCAC2087F; Tue, 9 Jul 2019 18:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562697128; bh=uKY1upGstB9eyiC2tvMjOQrnpwH5zhKS9cvZBMmwlRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R5NqjC4skuB80xSqY6Wwp1WwLiCweXwZ4voKnG+hZZIIGLatgkiHk+63fQN4xEqr8 SvuRJwGK0s2OPCDFsud6JvVO/9KhewPXZZLlxe6R8inbDBGyOn/YUFfL1UrrWJ82oC /KSRamxD4VurvzRcHPHPaEYLPpkeV2JjNtjxj8Q4= From: Arnaldo Carvalho de Melo <acme@kernel.org> To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de> Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Clark Williams <williams@redhat.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan <leo.yan@linaro.org>, Adrian Hunter <adrian.hunter@intel.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Alexey Budankov <alexey.budankov@linux.intel.com>, Alexios Zavras <alexios.zavras@intel.com>, Andi Kleen <ak@linux.intel.com>, Changbin Du <changbin.du@intel.com>, "David S . Miller" <davem@davemloft.net>, Davidlohr Bueso <dave@stgolabs.net>, Eric Saint-Etienne <eric.saint.etienne@oracle.com>, Jin Yao <yao.jin@linux.intel.com>, Konstantin Khlebnikov <khlebnikov@yandex-team.ru>, Mathieu Poirier <mathieu.poirier@linaro.org>, Peter Zijlstra <peterz@infradead.org>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Song Liu <songliubraving@fb.com>, Suzuki Poulouse <suzuki.poulose@arm.com>, Thomas Richter <tmricht@linux.ibm.com>, linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo <acme@redhat.com> Subject: [PATCH 05/25] perf trace: Fix potential NULL pointer dereference found by the smatch tool Date: Tue, 9 Jul 2019 15:31:06 -0300 Message-Id: <20190709183126.30257-6-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190709183126.30257-1-acme@kernel.org> References: <20190709183126.30257-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index d0eb7224dd36..e3fc9062f136 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1038,10 +1038,10 @@ static struct thread_trace *thread_trace__new(void) { struct thread_trace *ttrace = zalloc(sizeof(struct thread_trace)); - if (ttrace) + if (ttrace) { ttrace->files.max = -1; - - ttrace->syscall_stats = intlist__new(NULL); + ttrace->syscall_stats = intlist__new(NULL); + } return ttrace; }