From: "Charles (Chas) Williams" <ciwillia@brocade.com>
To: <dev@dpdk.org>
Cc: <linville@tuxdriver.com>,
"Charles (Chas) Williams" <ciwillia@brocade.com>
Subject: [dpdk-dev] [PATCH 1/3] net/af_packet: handle strdup() failures
Date: Wed, 17 May 2017 14:03:33 -0400 [thread overview]
Message-ID: <1495044215-16915-1-git-send-email-ciwillia@brocade.com> (raw)
Fixes: 1b93c2aa81b4 ("net/af_packet: add interface name to internals")
Signed-off-by: Chas Williams <ciwillia@brocade.com>
---
drivers/net/af_packet/rte_eth_af_packet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index a03966a..ce4dc07 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -630,6 +630,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
goto error_early;
}
(*internals)->if_name = strdup(pair->value);
+ if ((*internals)->if_name == NULL)
+ goto error_early;
(*internals)->if_index = ifr.ifr_ifindex;
if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) == -1) {
--
2.1.4
next reply other threads:[~2017-05-17 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 18:03 Charles (Chas) Williams [this message]
2017-05-17 18:03 ` [dpdk-dev] [PATCH 2/3] net/af_packet: add accessor for iface Charles (Chas) Williams
2017-05-22 9:39 ` Ferruh Yigit
2017-05-22 13:20 ` Charles (Chas) Williams
2017-05-17 18:03 ` [dpdk-dev] [PATCH 3/3] net/af_packet: fix packet bytes counting Charles (Chas) Williams
2017-05-23 9:50 ` [dpdk-dev] [PATCH 1/3] net/af_packet: handle strdup() failures Ferruh Yigit
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=1495044215-16915-1-git-send-email-ciwillia@brocade.com \
--to=ciwillia@brocade.com \
--cc=dev@dpdk.org \
--cc=linville@tuxdriver.com \
/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).