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 17C51A0C46; Mon, 6 Sep 2021 07:45:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DF8440E32; Mon, 6 Sep 2021 07:45:30 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id A076940C35; Mon, 6 Sep 2021 07:45:28 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10098"; a="207006886" X-IronPort-AV: E=Sophos;i="5.85,271,1624345200"; d="scan'208";a="207006886" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2021 22:45:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,271,1624345200"; d="scan'208";a="691538526" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 05 Sep 2021 22:45:27 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 5 Sep 2021 22:45:26 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 5 Sep 2021 22:45:26 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Sun, 5 Sep 2021 22:45:26 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Sun, 5 Sep 2021 22:45:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PIIJyn0n0VwVVeS8WhBoGS9LyA+pTx48TH73S8DUjwjx7YNyKx+5Jxh/aE1mPPdizwdnj4eXD+e8mksf3Y3K71OVHRJb9ERjUDUcMDQeSWO6+fFINP+i/BenC9VHkR2AdGUAIvb0Y3qfARh0GHGY6BdSwRicb+ed2voS70GEsXho0FG3bZvpLqYMymEPOBHScTkkBG7GHqVGz76E+OAMMC4QIqAYSObyDs/abPoPHTeN9cTspuVGEVBRgROVPLauOvcopjMZ0+UIZzofS1tYd06Hr65EcyqLrBE32qs7MMWKAQ7P2G6fnW5xx7jDcYk4RWkiigKUosd15dEO3CbRCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=e1EXermGCPmuHkdKIPrc/bIv7WFQz/aHk8FNR4g7G7w=; b=UQDj95C9LCcwtWD2Z+qy0PgW3tt8/rj7ILyvAbP9aaQWXopy9g3MGMSeQ1eJRxk8kyhDp4lBIFxC/tg59VVMfhLwoU2PQHHS5ZuZrv/h9Wy9g7TFS4m7JliBr86MriwYLH+tJbPykAq333SmNLsI6/M24FwaAIhzhoagf5BC2aQbEnwpGREvDvRlzAt34/fj89MkIUVpTk/jeuX87JkUeBwQuGz5+6duganF2F6Xr5+bGslouQslS0kSaplZak+ILsR5TSRwH/MBUwZOoZh2eCE7u47q6gUd+7VqfAWmYX4Wr64MaUp8M3RdoOVc0+QSnibk5aLK/jgidfYJ3ulDLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e1EXermGCPmuHkdKIPrc/bIv7WFQz/aHk8FNR4g7G7w=; b=f73UmKzaP+eFcblcrOWOiOdtlcHzNrYJbiuAWym0cyCw/JU0yhCxoCmZmdex71orB6BULcMcc3+ZiBTnYYYxHK5pFmFn3nl9KIVVc0w4Z73aW+1Lx2IM059W5K/ziftmqmEOJtlTtI+zhHvQ+rWw5pExKbdMQpyeQB02EawFWLQ= Received: from DM8PR11MB5591.namprd11.prod.outlook.com (2603:10b6:8:38::23) by DM4PR11MB5565.namprd11.prod.outlook.com (2603:10b6:5:39a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.25; Mon, 6 Sep 2021 05:45:24 +0000 Received: from DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::904:ace8:b3b:c1a2]) by DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::904:ace8:b3b:c1a2%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 05:45:24 +0000 From: "Peng, ZhihongX" To: Stephen Hemminger CC: "olivier.matz@6wind.com" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] lib/cmdline: release cl when cmdline exit Thread-Index: AQHXnhC381HXo9uzAU2Gt5tm0Dvog6uN1t+AgAixkJA= Date: Mon, 6 Sep 2021 05:45:24 +0000 Message-ID: References: <20210831022844.18057-1-zhihongx.peng@intel.com> <20210831095903.3eb3324e@hermes.local> In-Reply-To: <20210831095903.3eb3324e@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 81a96a6d-743b-4221-9260-08d970f985ac x-ms-traffictypediagnostic: DM4PR11MB5565: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1303; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Tly7RLz+O5fMQAGyAxGCm79hPiYoLCneqB1zIrldUnwSrleZFXVLb4Jg0E5LNJvQVHV2pD6gid7o74yYvWmsdwgGE/lfvYnUu1t3dKMRHuygTQQSxyadsvbs+7MF51ro54OOtLMAZodWkXwWHfDRmeNXcDm+q1Qd4DfqqXGzSDEIQuA4ftQVP31snrBQzVayj+yETToeZ2ju/w5NDhrwZYY413ouU98Ba4HwzK41VgL6jgFGCH9a3ueRZrmQktB2JNu2KM/ruk60VUdM7ScFPF0Qa7KLKVpHMvrpXp6CHTlKAERScCG9gfXfCHTqlWbHe5ItCAL14SRFhyqEltIWWHxutcMZchxS4m3cnED7AQtTay8XS15ZEu2a8J9WxmZz5kh99GfRFGh9gX15H5BRvj8NkH2O24IudQ2EJnKlc2opbr07ZXEexjfXdomR+Jmn3P7T/tqjJ+GCMrucw+jGdGzdTJ6AkXy7fBuNT4eKgWPRY5GmqZvyQhHOKiA+ztyRC1Zt/59/KRzCa9IN1G/C4N2OPkE95D0ennSGU5MHYq2E2iXE+VS6l5PIUA5qPhQ0goiaQk2P4YqO8/RlAe6HZaHc4r1TZwDfzx65avbd31pET6pEvX1Ej5DsDTyYwvFrdwkgBpYNiKGn7Bi/Li9FEQTy7MzhIbGhnLRhYs+8xx4dgTEU4hH7DI3kPSjDd8b2T5JKlJQS/wl6/qVX3CFCag== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5591.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(376002)(346002)(39860400002)(396003)(316002)(33656002)(478600001)(71200400001)(54906003)(7696005)(64756008)(6916009)(66476007)(52536014)(8676002)(38070700005)(186003)(9686003)(53546011)(122000001)(4326008)(55016002)(8936002)(26005)(5660300002)(6506007)(66946007)(76116006)(38100700002)(86362001)(83380400001)(66556008)(2906002)(66446008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TzIvipdzxDf5lke3l7bkOc3EAcfwRqR+ykP4/YQv5Df0XWzX1uifT/SnRGmJ?= =?us-ascii?Q?NW0pBtLO3quiOTm1IY8qteWs1txPfJhMYXfv5o17dzZg20Meg98NQc8t5Pok?= =?us-ascii?Q?N0tdZ5pFnO/XLkz73SjOgUE2qxjHQtj44wEE5gk7HbDQjFZAUOl0DfVgDsJM?= =?us-ascii?Q?YTGWZIhz/8clOeS8SaZIX4humYymPnl+M+JLOAFIuynzJoiJExmjv6+mUtyJ?= =?us-ascii?Q?GCRWX2xdGaCt+psHwbZXrbQUkXarYJxigy9qeTmeZKCDCG9rHva19BqWarEB?= =?us-ascii?Q?you/c62A78GnjzTJlcAlkhMEtBjfeZZe8FF9BulXJUc7bn7oaxVGsqWpsRwu?= =?us-ascii?Q?dJwssbiNnFNfMugt/Nhpa9qO8OyM6jdLCXwtDxq35lnz4oTm1mzrwtgAaASA?= =?us-ascii?Q?FaCUj23hsnoeJFKGPRJLKKJQkkOVftiDrGmpRxVFtdv6WsDK6b5DMlI3jvjL?= =?us-ascii?Q?v4LFAiZA1tpXjOixCdgiyhLAsFSX2x75gJ7cXpKqFHeqaIC33xt2MMUY9tN4?= =?us-ascii?Q?ouNm77uJ3kdGCs3NxvHPnyxP1i4d/qm/KOVHS0qLZgdxY3/bu8vp3zM4ZdFj?= =?us-ascii?Q?HOY6DAg44xNXBdY4BkiXiqmK53wo+Wx9krH4+8XMhq4SJJnTkgWE7LiSNbEC?= =?us-ascii?Q?k54/t93l2gwyDtnmH+xfkkii7QIQoOp9Fe+8rZSyJvCoEoQ+spYs1JBefs0e?= =?us-ascii?Q?/rHl45oRYq7cxv2xpNvxcT9I/5FMChiUNBQDN/TszHBUVgoUPRh6P1U06Nrx?= =?us-ascii?Q?NSs53K+xagOjo3VsaOuD/NkNzZtCAnEOG7OLciuyBD30dOXXrpYWeXOdCnY1?= =?us-ascii?Q?pYNI6m4+lzbTStspOAl+oXeHFXeEYbI6kt6YYS+UkhBfhwubHbwKkazV9Mds?= =?us-ascii?Q?0ie3zBDKOqBcOPRAVkocmlfJMJxlPDrrh/OAkEbsKVsGVaW0THMm+rJbTkML?= =?us-ascii?Q?rb6u43Au7uUYvKrL4UwzQe13WyElbNAzBfjMC2l48rgJEVDRN4nbQEVbuPV4?= =?us-ascii?Q?M94Ki+cSvBoaaVE0TkW1z8NxLNAxjfYFtr99u1mALl0xKCiNiGb3+CZTHqrp?= =?us-ascii?Q?pb2y478grXqeO8gG3jyr+pIUNxQmdSaJRcn2eBK0OvEE74ldkWJb9UoetfJY?= =?us-ascii?Q?YhnDycKFO9PgKU+n1RodjFkcl5z9nieTLQ8jgrjTJ45I0YYojm8WGSwzCJS5?= =?us-ascii?Q?EotGl08wO9Co6gx3zmYhy8DdGxh37RK+SVnMevMycefJ+Di0JdEa0M1lhUAz?= =?us-ascii?Q?SHrARQ6lJ8JFISTKulZD1QAPzcfiL+MPbN/cKQcC7teKRgqdY5gU5XixdIqf?= =?us-ascii?Q?kss=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5591.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81a96a6d-743b-4221-9260-08d970f985ac X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2021 05:45:24.0218 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZJGv+5pGM6WiJ0mx0gTX14FOvDRwv77JaJPdFjW5kgIsjXlEcTdQtRw3UiBfZv2yllkj5fVRrFIKMU/Li3ADpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5565 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] lib/cmdline: release cl when cmdline exit 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 Sender: "dev" > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, September 1, 2021 12:59 AM > To: Peng, ZhihongX > Cc: olivier.matz@6wind.com; dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] lib/cmdline: release cl when cmdline exit >=20 > On Tue, 31 Aug 2021 10:28:44 +0800 > zhihongx.peng@intel.com wrote: >=20 > > From: Zhihong Peng > > > > Malloc cl in the cmdline_stdin_new function, so release in the > > cmdline_stdin_exit function is logical, so that cl will not be > > released alone. > > > > Fixes: af75078fece3 (first public release) > > Cc: stable@dpdk.org > > > > Signed-off-by: Zhihong Peng > > --- > > lib/cmdline/cmdline_socket.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/lib/cmdline/cmdline_socket.c > > b/lib/cmdline/cmdline_socket.c index 998e8ade25..ebd5343754 100644 > > --- a/lib/cmdline/cmdline_socket.c > > +++ b/lib/cmdline/cmdline_socket.c > > @@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl) > > return; > > > > terminal_restore(cl); > > + cmdline_free(cl); > > } >=20 > How did you find this? valgrind? address-sanitizer? Use address-sanitizer.