From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60087.outbound.protection.outlook.com [40.107.6.87]) by dpdk.org (Postfix) with ESMTP id 6D89510A3 for ; Mon, 29 Oct 2018 19:48:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GeegLZyAe9R5f4JzF09HKDc7PKT02/VfAetZvSrDg6E=; b=JSkWUqo7+B8g5DAu1iCvR8gbwdZIaSzVPwEINpP7eDrvRSgjF8qTAWqXPn/XRUv9c78KEzydwot/yqxC/4+dpmAGmwm/cVBBLpusVUlYlAjiCLzJcNUDZhOp9tqxoKcCFjFLwnaS8yWKJayIhmAg/uDYS7LQorlWcpALMGXDfrU= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4025.eurprd05.prod.outlook.com (52.134.68.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.26; Mon, 29 Oct 2018 18:48:19 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::f8a1:fcab:94f0:97cc]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::f8a1:fcab:94f0:97cc%4]) with mapi id 15.20.1273.027; Mon, 29 Oct 2018 18:48:19 +0000 From: Yongseok Koh To: Dekel Peled CC: Shahaf Shuler , dev , Ori Kam Thread-Topic: [PATCH] net/mlx5: fix missing memory deallocation Thread-Index: AQHUb6g669c4SO27L0uIopZLZsBrMKU2kJkA Date: Mon, 29 Oct 2018 18:48:18 +0000 Message-ID: <8720A3D8-2767-40AC-A165-68C4FE6533EE@mellanox.com> References: <1540829350-45782-1-git-send-email-dekelp@mellanox.com> In-Reply-To: <1540829350-45782-1-git-send-email-dekelp@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4025; 6:ZbSHawaZ70lenb1sKV5zcKQNpZFuLLAHwi3Lf0WUqrfLZRPfiZBnScxEHPBhq2bvY4Ee2YL2HpXZDe3ovAD4F7hB0YjYmXZNM33cEvJBfc6skYFx+iJAPIKmpXRzp0l+CljwlQcAU79SmuYU3Ai90YbiKNTFutbkiwonfGTnYoh+nHbk06oYBk5X1OXmKL3Uyn9JfF7xxwKqlPrq9joFfN8PPCMj6Tv2EdBVOjtwSJP506GIAXLnK7FsvbTmeYNktTKNDN20lN4Ci/1WYs0mJdiyDCjVqa12oGhrQJOUA1aXpI1uzUJC8YpODdLOUH7EmDaV1+K/TsH2kqZeN0ZHGRG/OXHHn9hF540sbWHshFh67g5vUSzgBgEf6pCluQWfxqUwvsQHr8DFOLToXDxc8EeXbYQz+40NYo5rFfxvFjVzcsigESZk/KXA39K52mnLfu3zQJLgnzeJnhCgfcY0aQ==; 5:P3Y/tl4+8LHYhsg3+lGltTQUqsiwn2LJl0+6hBSE/LGFzrdfFuHAujf08X33m1WIuLh8OmOK2afzI7WJdpVixXhVhDtD/E+biiEnz8R5UqphA7VC0m0xzbQU27zPd/9PkoSMbsCblb46yyUqadznDJdkt93L2O5HjF5vIqngy/8=; 7:lTV4xmADoGtbX+tuN2hSWmn2JY3c3za4zMdO0EUVHQDzuCbjisBs5y1uBGAap2nCCAecDTGwzzOG+gDhSYSZA2XHRzTANIFqbJnxcVIJI7py0yEgWXeWmbqGPKh5sXJLtSG4ESVq145wbYwHverCYw== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 1497dc92-4c57-4ea3-d4f5-08d63dcf181b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB4025; x-ms-traffictypediagnostic: DB3PR0502MB4025: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:DB3PR0502MB4025; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4025; x-forefront-prvs: 084080FC15 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(39860400002)(346002)(376002)(199004)(189003)(53936002)(33656002)(97736004)(68736007)(5250100002)(14444005)(6246003)(25786009)(6512007)(256004)(5660300001)(107886003)(6636002)(6116002)(3846002)(82746002)(36756003)(6862004)(229853002)(105586002)(2900100001)(478600001)(81156014)(14454004)(86362001)(99286004)(2906002)(53546011)(6506007)(6486002)(476003)(106356001)(11346002)(83716004)(76176011)(8936002)(2616005)(4326008)(446003)(305945005)(71200400001)(7736002)(54906003)(6436002)(486006)(37006003)(81166006)(71190400001)(26005)(8676002)(316002)(102836004)(186003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4025; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: XtjPnM1+9kZOM6o2EFyTWm2Qgmyh6MylqogXdWkDaM0LlTUiS/U+ljzkStc0tJQkXcDveOVUOFolP5+91eQAVlbMtAcVlu4GWzqM1EUCq4Cf1dmlrilX3uaqS+YMc2ek3WMPGs1111N87FX+779bTp3i5n2UWWFYW8rBGqyJg4he/EY/xf+BIo7ABOzwTUxkdB49ZF9ZL9RPJ4rJu9W7rh0aV5rIr7lgAFuunbiZk9wqyBkqq9p/hagqG0muZu2BQV0Ee6Mlh82/fNTi9wVxboCm4CM3AyY/uhx62SegEj7z1alPYHoPwzns2w3Q9GfSANR1oPn1NC8TUgrc5r49tPJx0oqLMFY3qbDBtmziCW4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <8F38B0F47AB9294AADF1902709DAEB4C@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1497dc92-4c57-4ea3-d4f5-08d63dcf181b X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2018 18:48:18.9754 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4025 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix missing memory deallocation 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: , X-List-Received-Date: Mon, 29 Oct 2018 18:48:21 -0000 > On Oct 29, 2018, at 9:09 AM, Dekel Peled wrote: >=20 > Add freeing of allocated memroy before exiting on mlx5dv error. >=20 > Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items") > Cc: orika@mellanox.com >=20 > Signed-off-by: Dekel Peled > --- Nice catch! Acked-by: Yongseok Koh =20 Thanks > drivers/net/mlx5/mlx5_flow_dv.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow= _dv.c > index 8f729f4..0e1f715 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -1203,10 +1203,12 @@ > dv_attr.flags |=3D IBV_FLOW_ATTR_FLAGS_EGRESS; > cache_matcher->matcher_object =3D > mlx5_glue->dv_create_flow_matcher(priv->ctx, &dv_attr); > - if (!cache_matcher->matcher_object) > + if (!cache_matcher->matcher_object) { > + rte_free(cache_matcher); > return rte_flow_error_set(error, ENOMEM, > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, > NULL, "cannot create matcher"); > + } > rte_atomic32_inc(&cache_matcher->refcnt); > LIST_INSERT_HEAD(&priv->matchers, cache_matcher, next); > dev_flow->dv.matcher =3D cache_matcher; > --=20 > 1.8.3.1 >=20