git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f28ede5
)
net/af_packet: handle possible null pointer
author
Chas Williams
<ciwillia@brocade.com>
Wed, 17 May 2017 18:03:33 +0000
(14:03 -0400)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:26 +0000
(10:41 +0100)
Fixes:
1b93c2aa81b4
("net/af_packet: add interface name to internals")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <ciwillia@brocade.com>
drivers/net/af_packet/rte_eth_af_packet.c
patch
|
blob
|
history
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
(file)
--- 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) {