Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3295646pxk; Mon, 21 Sep 2020 09:57:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr3s5gdCkZ/pLbNjcOdiPdHUgM3HswNVjFhqHqo3QztBIGzBG8YQ4Sl9ZSM3EOpO4apzPN X-Received: by 2002:a17:907:110f:: with SMTP id qu15mr356071ejb.359.1600707425598; Mon, 21 Sep 2020 09:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707425; cv=none; d=google.com; s=arc-20160816; b=EflSbiceIfandNs8l09dVG5w2+0OkdGTgAu0wzUPdt8ROYeEGGsnu0RXXeW77BB3d4 HNA0gkoETU8fy8khOBtCuTynLhAQJYpP0wHiAC6e6EZcWqyS5GAiOEZHxqMJcQuwsqds NBoBThlfpEUsu4XbdRcD6og42SFGiZq3l3dP5GD5poa2G1pGydjGa0EdAF6qjBOD+7UL kAPB9dsake1njo/ma92KW/fuGFB52na5q2Oh72GACth/YZLXM92f2WDEK4+c5woO6BCf V0RPwJrFWhSRuNj/955HNs0wV4ElxdWDs5YMogTYBpe/0zbvRU52fCpPNF1KdT/Mkdcu qZ/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SXsiSJ2VxTj48GXXVNbInedhVgHOVWNaBdYkSft0nsA=; b=M4S4aILyYOaclRcrx5H/2KxNEppXk4cwMnATjLn5rqbmCA2SdRg1Ub1nBGNaJvueWm WADwoJDrWEtQqsj9ZeEI4HE5ZFgsTKOW8zXj8aryXb9D/UtenJ2bgA3n7vqDd5Z8JQ5K v9mw6pgqCdV5qAvuv2ZkqObMwRxiTjwF9NGHlDZMhvr+A9lm8dz3X/RAs8PgtmsNGvAT 56zmcAeRrFnUv1r0+OxO3Je5u6Mx7hivL5CaFL+iw4eg4VpZAIFjOOyNSbB1swVS0tX8 3mgTsGRLn2JxWkpva48DGY3SnqPKkQc5MOOcq/fqwJwo93cxZXPHBWBdYEceGUaIg70K VeDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RRSFkjBt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si8298359edc.249.2020.09.21.09.56.42; Mon, 21 Sep 2020 09:57:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RRSFkjBt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728138AbgIUQpn (ORCPT + 99 others); Mon, 21 Sep 2020 12:45:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:51786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgIUQpl (ORCPT ); Mon, 21 Sep 2020 12:45:41 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 3C5E92076B; Mon, 21 Sep 2020 16:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706740; bh=Ym6t0eaYuLupir2lStyz4Gr4PMkrUEHoS+dTrxBEu8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RRSFkjBtB4SPpp46gxbXaonPP0w8LfkIIVmk9vw0crvp2hnMbpUt6yVjojj3gHfXw y73FwCf2vrOMz9MrQ4XHLMgBVhGvCM/3ImnXferIE8NikXo3SsSzNJ6nxj9Wg3NQWf ETDY9+ERZ+lEyi6kxvRdTxbGrGIVDBVkmKtCRWEk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Nick Desaulniers , Sasha Levin Subject: [PATCH 5.8 075/118] kconfig: qconf: use delete[] instead of delete to free array (again) Date: Mon, 21 Sep 2020 18:28:07 +0200 Message-Id: <20200921162039.823243128@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit a608b6a646e8816bc0db156baad2e0679fa4d137 ] Commit c9b09a9249e6 ("kconfig: qconf: use delete[] instead of delete to free array") fixed two lines, but there is one more. (cppcheck does not report it for some reason...) This was detected by Clang. "make HOSTCXX=clang++ xconfig" reports the following: scripts/kconfig/qconf.cc:1279:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete data; ^ [] scripts/kconfig/qconf.cc:1239:15: note: allocated with 'new[]' here char *data = new char[count + 1]; ^ Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again") Fixes: c9b09a9249e6 ("kconfig: qconf: use delete[] instead of delete to free array") Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Signed-off-by: Sasha Levin --- scripts/kconfig/qconf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 5ceb93010a973..aedcc3343719e 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1263,7 +1263,7 @@ void ConfigInfoView::clicked(const QUrl &url) } free(result); - delete data; + delete[] data; } QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) -- 2.25.1