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:
15d0215
)
linux-cp: Fix coverity issue
38/35138/3
author
Pim van Pelt
<pim@ipng.nl>
Fri, 28 Jan 2022 14:29:21 +0000
(14:29 +0000)
committer
Matthew Smith
<mgsmith@netgate.com>
Fri, 28 Jan 2022 16:46:12 +0000
(16:46 +0000)
Type: fix
Possible negative return in open(), do not use curr_ns_fd if it is
negative. Addresses Coverity issue 248535
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: I8429ede0f1fe9fe6619e3c4dbd83adb620ea62c2
src/plugins/linux-cp/lcp_nl.c
patch
|
blob
|
history
diff --git
a/src/plugins/linux-cp/lcp_nl.c
b/src/plugins/linux-cp/lcp_nl.c
index
8a55f4c
..
1c0ca0d
100644
(file)
--- a/
src/plugins/linux-cp/lcp_nl.c
+++ b/
src/plugins/linux-cp/lcp_nl.c
@@
-496,7
+496,7
@@
lcp_nl_open_socket (void)
nl_connect (nm->sk_route, NETLINK_ROUTE);
- if (dest_ns_fd)
+ if (dest_ns_fd
&& curr_ns_fd >= 0
)
{
setns (curr_ns_fd, CLONE_NEWNET);
close (curr_ns_fd);