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=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 647C2C43465 for ; Mon, 21 Sep 2020 16:55:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FF4520719 for ; Mon, 21 Sep 2020 16:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707340; bh=Ym6t0eaYuLupir2lStyz4Gr4PMkrUEHoS+dTrxBEu8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=xCYf9gs4glTxWkdLMyXqjeN00xweJuqn7ZRfL3m6xjPurwfx96GRzo0ANxvz3XmMc Kkbbk8IRAY/Mrjh/UdtbfH8WqDgc+mg58tE5mCQXF51Nta6E+RY6IGQQhtQySeq0gD GNjoUbMd2jhwHVcKUfxDnAo9Vji+SAskecsj0LIg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728337AbgIUQpp (ORCPT ); Mon, 21 Sep 2020 12:45:45 -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