Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp537715pxk; Thu, 17 Sep 2020 09:23:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRjjdVXB7UTq+lMaE/b6pgpd2xf0ct1vVhD4+pfixCjN1tPAFO87BsRfy4T708J8JalMRe X-Received: by 2002:a17:906:f6c6:: with SMTP id jo6mr31282436ejb.251.1600359799030; Thu, 17 Sep 2020 09:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600359799; cv=none; d=google.com; s=arc-20160816; b=l5wOYzq6iDHND5IyatDPqehHalNsfCf2lVEiWqdnL25eCHENbgnqLcgaaDzv4/A9UW +9vtPZOvtisHQvymrTWwV/CwSNTTAVCz6itw3OgU5C08Lrd6btyqDWaAMqjoRoEHZebV JRpZ7k7vO5S+dk30Z0gaSND7iPIZONyuviBrrCM4iTrSMlzmYWOgAl3+xljTeF3FjEwo /7JvP3n4yOSmXgZ+dFi8pSntofwUq4I54EvOpkeAzoNRfmnirGnbYiAefV6rpV5GjK3c FhR1r0TQzx/YwpBopGmg4gZf+ZdHc67pl9z6scDk3cRBMqpq8JgSDPt8g2AFg3vdVbS0 m5qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=yULUqiWt2SWgw5mTiS7zYO2hzW0Ie61k0FqxlWmWeH4=; b=J9wVYAQvX3BiOzehq6dK/sRfvF9j6vpQoumi/gQL2YlOgEOX4UHdWJxmoRbtXk7G3T N75v6PTl9uB4T2Q6oofKlDbrUbUbQNEVBh6oASyVHnUijtmQfJZO7cKkgIfNUCeCrAGm +0/VD6jn+i+ZGFlDSGPv0McMw0I9tKpHkQlIYco2ZXkrmaH6x5TPgNphPwI1LY8ssLEu URZ3i+meJUaEFrzVYyXIx5ixlltkcmxk9YqKWvTtz3p9d76xqJq/Omu+nTJ/wd+iwmcm qKD6IIfjpu7rKQqxEz+4rn4JX5jFgyAJKUqnO7Uq5EfkiFQrob0mgDfdRk9+5Mr79rbT QIZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LElvIdS9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si159670ejm.474.2020.09.17.09.22.54; Thu, 17 Sep 2020 09:23:19 -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=@nifty.com header.s=dec2015msa header.b=LElvIdS9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728434AbgIQQU3 (ORCPT + 99 others); Thu, 17 Sep 2020 12:20:29 -0400 Received: from condef-01.nifty.com ([202.248.20.66]:34881 "EHLO condef-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728362AbgIQQRW (ORCPT ); Thu, 17 Sep 2020 12:17:22 -0400 Received: from conssluserg-03.nifty.com ([10.126.8.82])by condef-01.nifty.com with ESMTP id 08HGBjSp013101; Fri, 18 Sep 2020 01:11:45 +0900 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 08HG96BI023460; Fri, 18 Sep 2020 01:09:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 08HG96BI023460 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1600358947; bh=yULUqiWt2SWgw5mTiS7zYO2hzW0Ie61k0FqxlWmWeH4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LElvIdS9XHoSA00xhrPQymc7YKtyp5JVFGDJu54Udb+uE+/GqPj8sV/2vsS5DuATo S1LzrbX8tkVWzTZemJiiWQc50jsuiQVb9ecrVUCXejhWLbNHf9Vm1up6trEU20SIfm 90xLCwxca3/BWzZHxPvSTh7E7kV95RY45sw4uxBO01Z1SAgkB8CHLSAFEWBEg2BnBG Kq28yZkdp6YaKvAp3vfdTcKuCr/zic54q4sd2ruGm4H9gR1Dfx+QHnHuyYK/cBXCZC SZMLhTyARc9Mu8QFzQ29qErYXTl19aw++7TUPYpJmRZTASHkeXmsECY/1BC3wLqFZw K+mtEGa7r1sLQ== X-Nifty-SrcIP: [209.85.216.42] Received: by mail-pj1-f42.google.com with SMTP id gf14so1452998pjb.5; Thu, 17 Sep 2020 09:09:06 -0700 (PDT) X-Gm-Message-State: AOAM530GxbNcPybOP1NWCSTBtvaik3q0HZYq2mDmZ5zZaK0iQrXKqVV6 pSo4ADSo02Epz51aNQ2qSQ22gTMrxEgw3QdAiL8= X-Received: by 2002:a17:902:34f:b029:d1:e5e7:bdcf with SMTP id 73-20020a170902034fb02900d1e5e7bdcfmr11915446pld.47.1600358946099; Thu, 17 Sep 2020 09:09:06 -0700 (PDT) MIME-Version: 1.0 References: <20200908221638.2782778-1-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Fri, 18 Sep 2020 01:08:27 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] kconfig: qconf: use delete[] instead of delete to free array (again) To: Nick Desaulniers Cc: Linux Kbuild mailing list , Mauro Carvalho Chehab , Nathan Chancellor , clang-built-linux , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 11, 2020 at 2:24 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Tue, Sep 8, 2020 at 3:17 PM Masahiro Yamada wrote: > > > > 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 > > > --- > > > > 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 8638785328a7..c7216b9110fc 100644 > > --- a/scripts/kconfig/qconf.cc > > +++ b/scripts/kconfig/qconf.cc > > @@ -1276,7 +1276,7 @@ void ConfigInfoView::clicked(const QUrl &url) > > } > > > > free(result); > > - delete data; > > + delete[] data; > > } > > > > void ConfigInfoView::contextMenuEvent(QContextMenuEvent *event) > > -- > > 2.25.1 > > > > > -- > Thanks, > ~Nick Desaulniers > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOdnP7UmpRPL8XjzoMPjgQb9Di8OXk9UEX8NWaa35A01Q3Q%40mail.gmail.com. Applied to linux-kbuild/fixes. -- Best Regards Masahiro Yamada