From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B6A945D0B; Fri, 15 Nov 2024 07:04:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E55F742EF2; Fri, 15 Nov 2024 07:04:14 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id D952842E52 for ; Fri, 15 Nov 2024 07:04:12 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4XqRJX40S1z21lBq; Fri, 15 Nov 2024 14:02:52 +0800 (CST) Received: from kwepemk500009.china.huawei.com (unknown [7.202.194.94]) by mail.maildlp.com (Postfix) with ESMTPS id 0C8A21A0188; Fri, 15 Nov 2024 14:04:09 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 15 Nov 2024 14:04:08 +0800 Message-ID: <8c05464f-e8e8-4b98-a720-7c7211667410@huawei.com> Date: Fri, 15 Nov 2024 14:04:08 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 06/12] bus/uacce: remove memset before free To: Stephen Hemminger , References: <20241114011129.451243-1-stephen@networkplumber.org> <20241114184452.31854-1-stephen@networkplumber.org> <20241114184452.31854-7-stephen@networkplumber.org> Content-Language: en-US From: fengchengwen In-Reply-To: <20241114184452.31854-7-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemk500009.china.huawei.com (7.202.194.94) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org There is no sensitive information in dev, so Acked-by: Chengwen Feng On 2024/11/15 2:43, Stephen Hemminger wrote: > Doing memset before free maybe removed by compiler, and > is flagged by security scanning tools as potential problem. > In this case the memset is unnecessary. > > Signed-off-by: Stephen Hemminger > --- > drivers/bus/uacce/uacce.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c > index c1529c38c0..35c1027245 100644 > --- a/drivers/bus/uacce/uacce.c > +++ b/drivers/bus/uacce/uacce.c > @@ -454,7 +454,6 @@ uacce_cleanup(void) > dev->device.driver = NULL; > > free: > - memset(dev, 0, sizeof(*dev)); > free(dev); > } >