Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4261801pxk; Tue, 8 Sep 2020 15:18:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9fP+cmAOjl4aMpEIicC7JeQq9BSiK5Y5k3WINVSFL1LtWc1Np/21lZNJEAkyDgW22ErNq X-Received: by 2002:a50:bb26:: with SMTP id y35mr1265060ede.234.1599603533281; Tue, 08 Sep 2020 15:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599603533; cv=none; d=google.com; s=arc-20160816; b=ndAe5X/nV0SywQ7YdCYwfeXlEWYJDWYy07yB+jhLALd1nn2fc26fk7s0hl0HfXL0XM f9Leb0W7i7kMkcanOm/1DKNpJJPn++6pe6UqtcT2Sx/VWydbfWp0XWnrCJ8Qi8ba5zfw 24DWQF0w9/HaS2PabH9chEDTAaoNzQ6v6+WumsNGYHHUwXhZULa7OgQgVKyZrezQycbo 3DS8uEQoSKyYB3sGUXnF5EwRJKtTuz0zaTkjaOCWz9TYY4KTRNt5h+4fgogBEo0A35mR jz0MsG3E/+l9AhoUm+roN+dOr6D7j1aTweiXWm5hT5QZN3P/weLLSp36SN9FTtoDosV0 X8Fg== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=WB8vckX/90tGacfzSunXHhuYCkqvIfPGjxJ91cYrgWg=; b=HJf9tQUsm/gh/n9faVLUBNxf9Iy+p5Vm258mvKySoZFrikS1nD3CREPHnn6+jxHTwc ILgkqV9j/aMMn+aFWzz2hpgipwIzZ23ra00E1hA+8Uwd1RwoNBHZfVmiNY3WYZYxM9HP zepvSpc7iL5W6rsi6t4o8htXZPLITd02Ha4KcqJpPa5J53Sxo/SyQMoiLW+pjnkfKxIt oBrtYMDHU+EibBieNV/HBVlahorzh2He+fF59DT6mB8CHUDUl4BrCG0bof5rUPksKKOn vgitch/1W2BhG0XhNrKmZAI/2ND7D4gOxKfyTz2O3Q8ETGMlY/LtEPC6MJJxZpMgj8bO MynA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="LQZcLC/N"; 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 bv7si217410ejb.523.2020.09.08.15.18.31; Tue, 08 Sep 2020 15:18:53 -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="LQZcLC/N"; 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 S1729753AbgIHWRy (ORCPT + 99 others); Tue, 8 Sep 2020 18:17:54 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:47314 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729037AbgIHWRx (ORCPT ); Tue, 8 Sep 2020 18:17:53 -0400 Received: from oscar.flets-west.jp (softbank126090211135.bbtec.net [126.90.211.135]) (authenticated) by conuserg-09.nifty.com with ESMTP id 088MGrFj012572; Wed, 9 Sep 2020 07:16:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 088MGrFj012572 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1599603414; bh=WB8vckX/90tGacfzSunXHhuYCkqvIfPGjxJ91cYrgWg=; h=From:To:Cc:Subject:Date:From; b=LQZcLC/NYCIDMT5bR6pKayYjGAcL9tY2C4kobxAIFaz4pPMvCqwRER/lyrdMOXY/V xgRGyRUnRybHzBwAs1sGuqipMGfIqKpsSmX1DA6hittc3CTpBGO6JnF60vRzfD6Efb jitCB3mvl6vOx6WQC6c9SkS7fTSPp5GaI0WKg8XMcMnDOZiEBcooHoUZhnDjNNX+YN VI+5PoSQcj1ix3gEcFE45EfqnSY548iuRowVly5EdV2/qVm4PYUyYJSpXnxl6uBiXI ZYikmehNOFClg96erdgi6vY+nrUjysSPx2+7A/dK1FSYBIbKTYR07eSenjB4iXcJn+ StkYKww1a/zdQ== X-Nifty-SrcIP: [126.90.211.135] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] kconfig: qconf: use delete[] instead of delete to free array (again) Date: Wed, 9 Sep 2020 07:16:37 +0900 Message-Id: <20200908221638.2782778-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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