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:
de728ac
)
memif: coverity fix
86/15186/2
author
Jakub Grajciar
<jgrajcia@cisco.com>
Tue, 9 Oct 2018 08:02:46 +0000
(10:02 +0200)
committer
Jakub Grajciar
<jgrajcia@cisco.com>
Tue, 9 Oct 2018 08:07:41 +0000
(10:07 +0200)
Change-Id: I2b14e2a035a37b04816aac1e610146be58ad1e92
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
src/plugins/memif/memif.c
patch
|
blob
|
history
diff --git
a/src/plugins/memif/memif.c
b/src/plugins/memif/memif.c
index
63f72a3
..
e8fb0e9
100644
(file)
--- a/
src/plugins/memif/memif.c
+++ b/
src/plugins/memif/memif.c
@@
-680,8
+680,10
@@
memif_socket_filename_add_del (u8 is_add, u32 sock_id, u8 * sock_filename)
}
/* check dir existance and access rights for effective user/group IDs */
- if (faccessat ( /* ignored */ -1, dir, F_OK | R_OK | W_OK, AT_EACCESS) <
- 0)
+ if ((dir == NULL)
+ ||
+ (faccessat ( /* ignored */ -1, dir, F_OK | R_OK | W_OK, AT_EACCESS)
+ < 0))
{
vec_free (dir);
return VNET_API_ERROR_INVALID_ARGUMENT;