DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] net/af_packet: handle strdup() failures
@ 2017-05-17 18:03 Charles (Chas) Williams
  2017-05-17 18:03 ` [dpdk-dev] [PATCH 2/3] net/af_packet: add accessor for iface Charles (Chas) Williams
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Charles (Chas) Williams @ 2017-05-17 18:03 UTC (permalink / raw)
  To: dev; +Cc: linville, Charles (Chas) Williams

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-23  9:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 18:03 [dpdk-dev] [PATCH 1/3] net/af_packet: handle strdup() failures Charles (Chas) Williams
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

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).