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 CF9D443B3A; Sun, 18 Feb 2024 14:50:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40A6840262; Sun, 18 Feb 2024 14:50:25 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 6550B4021D for ; Sun, 18 Feb 2024 14:50:23 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id A16C63200A13; Sun, 18 Feb 2024 08:50:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 18 Feb 2024 08:50:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1708264221; x=1708350621; bh=81a8hkAS3+daaKoy7dA/68FxWxZILISRro0k2qE5Qhk=; b= J1rT5xo7eYt+JTn4IP/tDXhj3268JeOKhXml0SKTkqkHkykfpFXZG10kNmBuYpho e9UzGgx5MpgItq6S45xGcKxQ14z963XfF25Jk/7Ayxc6/ecBDzukiKFqgEsucRsd AcBYefIPbdk8ZHL3Tr/wdgz4zmiWr7189u/jJQN+i/zcPNu9MQG4VUDhYAhZkf/H /JB9ua/gfm4l0a40Ow4RzBu0QXG9sRClssiRJNyCRJrh3LnunopEqxjuClnQsK8V CA2ep1hd9I+bP/YkCtY6RQWQOo6fWGyY4DErK0gbFhF87+lDybFLYeeArtNbxohu nh9Y30qYJC4A5Cfl+Azsbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708264221; x= 1708350621; bh=81a8hkAS3+daaKoy7dA/68FxWxZILISRro0k2qE5Qhk=; b=a 0Nmmxb3daM/5l9BWJ6HeTam07vc34kOB+R7DTgKutGZiQiO3HDLTdqZF6XkGIGFZ vtGIyAVBl9dpFrCRFw2w5aXUVK8veuEHigNSYLK4kMzckCtqO+nn+7tAsRYVsTnu 04MSB/tkf4nXp/giNza9hCtUX05bb/Gwb7SL4OCvqhImJbnTv64Q85oezlfdKU8t Dpn7c9G1hIkbzkRku8gBnh7BvzvGZBsDMIxEOfvPe2+U+wPYgI5eD26bEJ2o3eYj bsBFVyi89F1hBkMdY0VsoI4sbz1OaKiOeIY+sbkCnMdHQSrBevFg+kBmKOGfK4+N irQp5M3/yl2tGvytWVjgw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeigdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepgedttdeljeejgeffkeekkedtjeevtdehvedtkeeivdeuuedviedu vdelveejueejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 18 Feb 2024 08:50:19 -0500 (EST) From: Thomas Monjalon To: Chengwen Feng Cc: ferruh.yigit@amd.com, Keith Wiles , Ciara Power , Bruce Richardson , Jeff Guo , Jianfeng Tan , dev@dpdk.org, "lihuisong (C)" Subject: Re: [PATCH v2 01/16] eal: verify strdup return value Date: Sun, 18 Feb 2024 14:50:17 +0100 Message-ID: <3908156.n0HT0TaD9V@thomas> In-Reply-To: <33374b1c-5d68-ed0e-cb2c-ceda04187903@huawei.com> References: <20231110100117.8350-1-fengchengwen@huawei.com> <20231110100117.8350-2-fengchengwen@huawei.com> <33374b1c-5d68-ed0e-cb2c-ceda04187903@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 21/11/2023 04:44, lihuisong (C): > =E5=9C=A8 2023/11/10 18:01, Chengwen Feng =E5=86=99=E9=81=93: > > --- a/lib/eal/linux/eal_dev.c > > +++ b/lib/eal/linux/eal_dev.c > > @@ -181,7 +181,10 @@ dev_uev_parse(const char *buf, struct rte_dev_even= t *event, int length) > > buf +=3D 14; > > i +=3D 14; > > strlcpy(pci_slot_name, buf, sizeof(subsystem)); > > + free(event->devname); > It seems that above free for devname is unnecessary. You didn't reply to this comment, so I will drop this free call. > > event->devname =3D strdup(pci_slot_name); > > + if (event->devname =3D=3D NULL) > > + return -1;