From: Sachin Saxena <sachin.saxena@nxp.com>
To: Chengwen Feng <fengchengwen@huawei.com>,
"thomas@monjalon.net" <thomas@monjalon.net>,
"ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
Hemant Agrawal <hemant.agrawal@nxp.com>,
Shreyansh Jain <shreyansh.jain@nxp.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v2 03/16] bus/fslmc: verify strdup return value
Date: Wed, 15 Nov 2023 02:43:30 +0000 [thread overview]
Message-ID: <AS8PR04MB856253B6FE86572DAC0BBF8DE3B1A@AS8PR04MB8562.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20231110100117.8350-4-fengchengwen@huawei.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
> -----Original Message-----
> From: Chengwen Feng <fengchengwen@huawei.com>
> Sent: 10 November 2023 03:31 PM
> To: thomas@monjalon.net; ferruh.yigit@amd.com; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Sachin Saxena <sachin.saxena@nxp.com>;
> Shreyansh Jain <shreyansh.jain@nxp.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v2 03/16] bus/fslmc: verify strdup return value
>
> Add verify strdup return value logic.
>
> Fixes: e67a61614d0b ("bus/fslmc: support device iteration")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> drivers/bus/fslmc/fslmc_bus.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
> index 57bfb5111a..89f0f329c0 100644
> --- a/drivers/bus/fslmc/fslmc_bus.c
> +++ b/drivers/bus/fslmc/fslmc_bus.c
> @@ -634,6 +634,10 @@ fslmc_bus_dev_iterate(const void *start, const char
> *str,
>
> /* Now that name=device_name format is available, split */
> dup = strdup(str);
> + if (dup == NULL) {
> + DPAA2_BUS_DEBUG("Dup string (%s) failed!\n", str);
> + return NULL;
> + }
> dev_name = dup + strlen("name=");
>
> if (start != NULL) {
> --
> 2.17.1
next prev parent reply other threads:[~2023-11-15 9:41 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 10:01 [PATCH v2 00/16] " Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 01/16] eal: " Chengwen Feng
2023-11-21 3:44 ` lihuisong (C)
2024-02-18 13:50 ` Thomas Monjalon
2023-11-10 10:01 ` [PATCH v2 02/16] bus/dpaa: " Chengwen Feng
2023-11-15 2:43 ` Sachin Saxena
2023-11-10 10:01 ` [PATCH v2 03/16] bus/fslmc: " Chengwen Feng
2023-11-15 2:43 ` Sachin Saxena [this message]
2023-11-10 10:01 ` [PATCH v2 04/16] bus/vdev: " Chengwen Feng
2023-11-21 3:36 ` lihuisong (C)
2023-11-10 10:01 ` [PATCH v2 05/16] dma/idxd: " Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 06/16] event/cnxk: " Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 07/16] net/failsafe: fix memory leak when parse args Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 08/16] net/nfp: verify strdup return value Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 09/16] app/dumpcap: " Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 10/16] app/pdump: " Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 11/16] app/test: " Chengwen Feng
2023-11-21 3:33 ` lihuisong (C)
2023-11-10 10:01 ` [PATCH v2 12/16] app/test-crypto-perf: " Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 13/16] app/test-dma-perf: " Chengwen Feng
2023-11-21 3:32 ` lihuisong (C)
2023-11-10 10:01 ` [PATCH v2 14/16] app/testpmd: " Chengwen Feng
2023-11-10 11:44 ` Ivan Malov
2023-11-21 3:32 ` lihuisong (C)
2023-11-10 10:01 ` [PATCH v2 15/16] examples/qos_sched: fix memory leak when parse args Chengwen Feng
2023-11-10 10:01 ` [PATCH v2 16/16] examples/vhost: verify strdup return value Chengwen Feng
2023-11-21 3:35 ` lihuisong (C)
2024-01-15 2:57 ` [PATCH v2 00/16] " fengchengwen
2024-02-18 16:01 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AS8PR04MB856253B6FE86572DAC0BBF8DE3B1A@AS8PR04MB8562.eurprd04.prod.outlook.com \
--to=sachin.saxena@nxp.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=hemant.agrawal@nxp.com \
--cc=shreyansh.jain@nxp.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).