Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
90ea5dc
)
rdma: fix crash when failing to read pci addr on create
80/22580/2
author
Benoît Ganne
<bganne@cisco.com>
Mon, 7 Oct 2019 13:36:10 +0000
(15:36 +0200)
committer
Damjan Marion
<dmarion@me.com>
Mon, 7 Oct 2019 20:01:48 +0000
(20:01 +0000)
Type: fix
Change-Id: I543e2e5976cb384b81278a7ec98a0a6ab1612438
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/plugins/rdma/device.c
patch
|
blob
|
history
diff --git
a/src/plugins/rdma/device.c
b/src/plugins/rdma/device.c
index
ea6d278
..
6c48a97
100644
(file)
--- a/
src/plugins/rdma/device.c
+++ b/
src/plugins/rdma/device.c
@@
-566,6
+566,9
@@
sysfs_path_to_pci_addr (char *path, vlib_pci_addr_t * addr)
u8 *s;
s = clib_sysfs_link_to_name (path);
+ if (!s)
+ return 0;
+
unformat_init_string (&in, (char *) s, strlen ((char *) s));
rv = unformat (&in, "%U", unformat_vlib_pci_addr, addr);
unformat_free (&in);