From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 843EBA052B; Wed, 29 Jul 2020 13:47:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA55B10A3; Wed, 29 Jul 2020 13:47:22 +0200 (CEST) Received: from huawei.com (szxga02-in.huawei.com [45.249.212.188]) by dpdk.org (Postfix) with ESMTP id 5CAAD1023; Wed, 29 Jul 2020 13:47:21 +0200 (CEST) Received: from DGGEMM405-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 5A8347A99E6B4D6DE789; Wed, 29 Jul 2020 19:47:17 +0800 (CST) Received: from DGGEMM513-MBX.china.huawei.com ([169.254.1.141]) by DGGEMM405-HUB.china.huawei.com ([10.3.20.213]) with mapi id 14.03.0487.000; Wed, 29 Jul 2020 19:47:04 +0800 From: wangyunjian To: "dev@dpdk.org" CC: "jia.guo@intel.com" , "Lilijun (Jerry)" , xudingke , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing event_cb Thread-Index: AQHWUR7QcfVNu+5DP0OAOsbP9plydakemXsg Date: Wed, 29 Jul 2020 11:47:04 +0000 Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60D0F2D4B@dggemm513-mbx.china.huawei.com> References: In-Reply-To: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.185.168] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing event_cb X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Ping for review. Thanks, Yunjian > -----Original Message----- > From: wangyunjian > Sent: Friday, July 3, 2020 5:46 PM > To: dev@dpdk.org > Cc: jia.guo@intel.com; Lilijun (Jerry) ; xuding= ke > ; wangyunjian ; > stable@dpdk.org > Subject: [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing > event_cb >=20 > From: Yunjian Wang >=20 > The event_cb->dev_name is not freed when freeing event_cb, and this cause= s a > memory leak. >=20 > Fixes: a753e53d517b ("eal: add device event monitor framework") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yunjian Wang > --- > lib/librte_eal/common/eal_common_dev.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/lib/librte_eal/common/eal_common_dev.c > b/lib/librte_eal/common/eal_common_dev.c > index 9e4f09d..363a2ca 100644 > --- a/lib/librte_eal/common/eal_common_dev.c > +++ b/lib/librte_eal/common/eal_common_dev.c > @@ -526,6 +526,7 @@ static int cmp_dev_name(const struct rte_device *dev, > const void *_name) > */ > if (event_cb->active =3D=3D 0) { > TAILQ_REMOVE(&dev_event_cbs, event_cb, next); > + free(event_cb->dev_name); > free(event_cb); > ret++; > } else { > -- > 1.8.3.1 >=20