Message ID | 20190709183126.30257-5-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 e2csp8896236ilk; Tue, 9 Jul 2019 11:32:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnfBwTtw8Qlyj92JSW0fMq5n5pfSrlUH3ElX0Lg6g8GD9T/eEY5XzqHsjjVyPhU1eCxQtD X-Received: by 2002:a63:6c4:: with SMTP id 187mr164729pgg.401.1562697124693; Tue, 09 Jul 2019 11:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562697124; cv=none; d=google.com; s=arc-20160816; b=vaGEwkVbVSNiqNFEjnp6cOLxHfe9fDSGubEhFwy3AyM/5NILQEubdP6jgAlu7rgfks TGMvrO9SAdvdwRwFn7DRtux7M/M/0DpaEdQlhyFa1h7eRPu3SBJiQ6HxwIC2aPvnDBJx Ja1BhX7AWVq6jxhEiFbBpgwDn89iWVG3zYZq12K1NAXhjomQCxB8glkwcDXaOB6qo9PT 3MWVnfpJNoxPaahf2BqeLyDo1yMKN7AdWdum4O3uITLvdQ4RsOYvYC0GJOKemsasxwbU iy2zaiNSJNNoi6XzSgkc3gDT7G4uGU8RwSXQUZamFYk1FUcXrIE5LEBPRyndioLytmAy wNbQ== 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=XPGr3Em7TZSESLaW6HtkSjsM1hHmjB9grF4BfAvS/44=; b=vK42AlVVpWnB5eAa5E1mGLKnjnQ0VH7+eJW8xVLf0qWK6yieDkY9tQOo8Lr/dbgup5 V4I52MkakHmUDd15z+tJ8fwbndsOZdXx/dHlwFS0+0b0aQEcCuomw0P8BlR3Yx6BVloc 78oFrqQ60RV9Gw+6+8Ab9e5TQhEmHMoK0Lzbg/z54x6ZUoXmJSRxw+5STW0pSlj2n+tO FxIdId8rjwCi0LUgER8itOrJ0gQXZSbFB7XmNYBU8pY9vdzABdwo5b43xFe2GSY5Kp8f +tZkLgdz4Gj9oWhXmCC833owuB+v4KNhqwJm6jgxtgUjk5Cg+F/QHBZyVgMZD3RUd4Bt NVCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ae/0ykf8"; 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 t7si16515593plr.27.2019.07.09.11.32.04; Tue, 09 Jul 2019 11:32:04 -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="ae/0ykf8"; 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 S1729061AbfGIScD (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Tue, 9 Jul 2019 14:32:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:53288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726881AbfGIScC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 9 Jul 2019 14:32:02 -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 583DB21537; Tue, 9 Jul 2019 18:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562697121; bh=4014MKo13hkHV0d3pRWB5c8cnBeoEWRYJEclpGth5F0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ae/0ykf8ibATNOt5C+iqxcsMiu28JpUNOk20sand/gyMk/rjMDvn/8y3f2oy54irq dxUYtYetkX/2kYmlxHWifDw6s6Y81rnyC47U7Wne7cOIr0/jJDCq+gbxuy20wRMmov BlqbsYa2sSCBa5Mdkin7mmFfBNwCYfliYZDNhWic= 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 04/25] perf annotate: Fix dereferencing freed memory found by the smatch tool Date: Tue, 9 Jul 2019 15:31:05 -0300 Message-Id: <20190709183126.30257-5-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/util/annotate.c b/tools/perf/util/annotate.c index ec7aaf31c2b2..944a6507a5e3 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -1119,16 +1119,14 @@ static int disasm_line__parse(char *line, const char **namep, char **rawp) *namep = strdup(name); if (*namep == NULL) - goto out_free_name; + goto out; (*rawp)[0] = tmp; *rawp = skip_spaces(*rawp); return 0; -out_free_name: - free((void *)namep); - *namep = NULL; +out: return -1; }