Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1244895pxk; Thu, 10 Sep 2020 10:28:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhiw36YOhUZxblpofRLCn+uanosm/06eqipXFiZ8uxXI9zspbrz+TH77PzBeqFKiUaJJA3 X-Received: by 2002:a17:906:fb84:: with SMTP id lr4mr10507442ejb.282.1599758889988; Thu, 10 Sep 2020 10:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599758889; cv=none; d=google.com; s=arc-20160816; b=sb4fsPRKhjS2gYkvLa/ftu/WXy7t0NTOIQTn3sOUsXvTvdKl38yFJnVIVi2RCCkY2I 7sYWa5i4b3jtsugaZ98WgRYjve4mIGFoXm5Q8BhIUSBDf6Z/e4tBfKVuYOMzUnr4xdjU mUQEAL/XV4GlSrfaDjc3hZGYn6Nw+dFVc69iU96PS+CeuAn2igRvOK4hLQW0S6vb+5LA f+7koyoqPrm9cGB4CRVJS/KXrqTIJY3qjWyDlRiVUkZniS9J5+hSMqDRcWLL/6gPtyrw ZVdcIKuJJtNU9ZSp5M9GksHV8lD4/KjZFSshrh7GmuqYZPsJrFxY/3vpltcELdTbFf5u gJAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=g/DxpxIJfXdy7C8opyI8o+XkWeSXniE6Oz2qu6dzaF4=; b=T4+zteKvysPbJuqNtCYZ+Q3TYUDxRoTyrEhMqVjOV/LuJ0sGq5o8qdshhjVWxIQQit fmSTM84yKMkkPIKIfefRmv+K4Cp/xphWEN/Tub2hukhlkQRm5kdFCUQszWLxZ0mtd5jz fPBQX8OEcILt89qXHDOsYufbpp5EXxOMy20AfOVQdOTYz+CtzqY2CfrVJia9Rg00Wq36 VB7chUwGWVRPHlz9Sy6ahDewtfG3Mb44rPVnAXw+RhcF90O0MKtlbdoxEx6US3ScN32j CTGb9FW0HjeMBHNlYJTimDPc6YhLvKfPwAmM9IrUEUo7YLlHGTMnI5eEEExdNZezzmkm 1gbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qMZpuCyY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si4039832edt.106.2020.09.10.10.27.45; Thu, 10 Sep 2020 10:28:09 -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=@google.com header.s=20161025 header.b=qMZpuCyY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbgIJR1A (ORCPT + 99 others); Thu, 10 Sep 2020 13:27:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbgIJRYp (ORCPT ); Thu, 10 Sep 2020 13:24:45 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A713EC0613ED for ; Thu, 10 Sep 2020 10:24:45 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id d9so5024546pfd.3 for ; Thu, 10 Sep 2020 10:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g/DxpxIJfXdy7C8opyI8o+XkWeSXniE6Oz2qu6dzaF4=; b=qMZpuCyYWD6jZb+YzEyDAHOq9S96Dlc35zPEjydyxNKaUZLI+nsnTqKBltm7I7VQby HADCCTM9PWgXBnh/yMcjkuvxmRlsT5UNJXub/kYzv20GW2EKNQChlxY6p1hDrhjikVEM Y+KdEXPqXZ38Ol+OaDahwozrZuq1MEwyZ2pzintGUyw4fpxqp9GWD0eGlWbL4iCvW9Bj ofC7YnNgP7EgwY2vyDqqmL5l163B1x17PQenBv/kPXwJ3NQU2iMK+zB/IWAXaj3bZoaW oayGFBuGysrV56Qz+yWBWg7vkmwI0lExK3a6Cqh86+l2SoKA3YHsQx5QxJRwY1D4m3Gs hNwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g/DxpxIJfXdy7C8opyI8o+XkWeSXniE6Oz2qu6dzaF4=; b=mY4ztM6Egr/eEU3RZODjQiNNMg9b+zW7Fb/rbhWPWZpCSFOj+UbLtky6AGibwIf2Lp 9RXpJDKTS8LExZlGH5tRuKwnrGeBG9MvbVDU1ZZVg6spUtvz6ziZf7i2h1pv3E9iN8Ck 955tCH/Xft0N249Mx1Id6kcLDjFJRS2QbUxPmOcgqVoo/eckRS9LiwWzg4HgCPHirqTn Ye0jeNATg0FbmaVa+YGdsZ5LmC2sLFc5EefoZ85QpkNf9Ur6q7zAhFYwK56E9FDmOLhd mdkGXqIT21ADEmmULd58iJhscWMVmviGntgNuXiwWGTGp1Wmo237fRoFwHykjE5R0NCY EBsA== X-Gm-Message-State: AOAM533mjTxGKZDRWTSMgE8Yk1oWobD0H1wfpDbkn4u031itGpwWBbSR XMeMBscj41jYVwDI/dS3cA6mpP6BzzRIElAWDyaswUph4PA= X-Received: by 2002:a62:8349:: with SMTP id h70mr6667701pfe.47.1599758684979; Thu, 10 Sep 2020 10:24:44 -0700 (PDT) MIME-Version: 1.0 References: <20200908221638.2782778-1-masahiroy@kernel.org> In-Reply-To: <20200908221638.2782778-1-masahiroy@kernel.org> From: Nick Desaulniers Date: Thu, 10 Sep 2020 10:24:33 -0700 Message-ID: Subject: Re: [PATCH 1/2] kconfig: qconf: use delete[] instead of delete to free array (again) To: Masahiro Yamada Cc: Linux Kbuild mailing list , Mauro Carvalho Chehab , Nathan Chancellor , clang-built-linux , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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