From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96C4EC43461 for ; Thu, 17 Sep 2020 16:20:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FFDD20708 for ; Thu, 17 Sep 2020 16:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600359650; bh=TlKcsu6OaCiJb3adQF1yqdBdeWjwxueSfoEmYK7i4Zk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=W4Ld5Vwtxyham4qeIkPRqu1II6QFU6Kata4QaKUox+U8hDunTxRUtQtB/juSWOAvq rfw32H6EfZ0o41W1tC+GA9MbiPpANW150LUP60lN3JKYGeF0fj+30xbNobdxuWu8pD azv9p8IBKkJlThG7uivpoWgw72ih4X5yE5S/Yb24= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728445AbgIQQUn (ORCPT ); Thu, 17 Sep 2020 12:20:43 -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-Google-Smtp-Source: ABdhPJxssgarhgzM7MqOY61Xtmz9VYnoIYinKy6ZG1jOP7WdiUzDiYTfNkWC8PDvBunlBOClw2h2K/YvUZa15pElPuU= 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