Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17923085ybl; Thu, 2 Jan 2020 14:53:55 -0800 (PST) X-Google-Smtp-Source: APXvYqyQKq7tP05cbKgBzDcj/Q5p8mky6QJDE31Ls0Z4J6J7dBav0a5Cmg22iocnJN/DyWoYHxgB X-Received: by 2002:a9d:53cb:: with SMTP id i11mr97097563oth.158.1578005635393; Thu, 02 Jan 2020 14:53:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005635; cv=none; d=google.com; s=arc-20160816; b=zeUD9tFYsMJlNvlJlAvqwV3gjEgGID+nZtIWKQtuY1v6O6rDkATzsts6qZxy8/9sGR DlioVaKOMs3seGxmuP0035i4oAuYyxx9ICou63zPTGNtlXqcSyWbo3vgsljqqhf989PC 7aFClphb0+KmAinxUsWEGcttYLmTBInC1fIyzRMbK7GQJ7SzdunQJ1cZi/AO5KzcQD1T /coHgLW/2ldIUVl8Z3k2oNTsnuh0vdEl23kHlpFR6xHcCnbyHWLpz8JspXD+BbhzTwBd aWgwCdkGfEEGHbR2NXpRy3o/U7B7a68X0zo/70DZkP8DbMGcKSdQf8Tcce/ryM6L/96F vzdA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YyQr7rmqYZArrz9mZ4mlCmkgkhuqwQddotSyrT357ts=; b=wi+VQIvt678cr+UPMinE8lxXn3m0IMqoQjKi3buug/+qtkKPdcgJPIziKMIQ0djUOj 76qVAda9frcuup8R/ZftBEj7Y+3ggrDq/0CBsxRkll3p/t1dmaBnWv3B+bOMV9KZAmdH x0Oku+NkP0qHwcw7ipWOMP86V03/eaDZwXrLW58XPkuhoi1wx910jAmBZLV+1AptdRSR /1z8wu8ugTGU85Nl+vQxfLUnPK/U61izBP31kWBLDnBsNJUUPz2mPifJ0g9h6ms65vIM E+boruN+GhoO3wchuDXG9Obe29Lb5b6WA/vSVOdTZiD8fFA3v32ZCgKvKqxheCsHlkXZ /flA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=05QjX7kK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si35090523otf.87.2020.01.02.14.53.43; Thu, 02 Jan 2020 14:53:55 -0800 (PST) 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=05QjX7kK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728885AbgABWWt (ORCPT + 99 others); Thu, 2 Jan 2020 17:22:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:43750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728966AbgABWWr (ORCPT ); Thu, 2 Jan 2020 17:22:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 3F322222C3; Thu, 2 Jan 2020 22:22:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003766; bh=Yb86dZj1zmqQt6V3G33LYnP/wlfh0kQGGKcZlNl/Qlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=05QjX7kKOt+H19WxBw1Q0hNiZaepLCPuxB+E3G7ASZArOHM5PeqwU5WSGdjFhj9lr +cQrw4yPK3jxwetSYKHJEU55amuBMXe4UyrM/1EYwkmDPHJOTh15CxNZ3sawTrTjQR m01t1kP4MBY+qHoqFVugaW3zILSeihmLmiTQpFKs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mattias Jacobsson <2pi@mok.nu>, Jiri Olsa , Peter Zijlstra , Sanskriti Sharma , Arnaldo Carvalho de Melo , Nobuhiro Iwamatsu Subject: [PATCH 4.19 079/114] perf strbuf: Remove redundant va_end() in strbuf_addv() Date: Thu, 2 Jan 2020 23:07:31 +0100 Message-Id: <20200102220037.065790380@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mattias Jacobsson <2pi@mok.nu> commit 099be748865eece21362aee416c350c0b1ae34df upstream. Each call to va_copy() should have one, and only one, corresponding call to va_end(). In strbuf_addv() some code paths result in va_end() getting called multiple times. Remove the superfluous va_end(). Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Sanskriti Sharma Link: http://lkml.kernel.org/r/20181229141750.16945-1-2pi@mok.nu Fixes: ce49d8436cff ("perf strbuf: Match va_{add,copy} with va_end") Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/strbuf.c | 1 - 1 file changed, 1 deletion(-) --- a/tools/perf/util/strbuf.c +++ b/tools/perf/util/strbuf.c @@ -109,7 +109,6 @@ static int strbuf_addv(struct strbuf *sb return ret; } len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap_saved); - va_end(ap_saved); if (len > strbuf_avail(sb)) { pr_debug("this should not happen, your vsnprintf is broken"); va_end(ap_saved);