diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2018-10-09 10:02:46 +0200 |
---|---|---|
committer | Jakub Grajciar <jgrajcia@cisco.com> | 2018-10-09 10:07:41 +0200 |
commit | 7d476e03aa3832c4c5b2ec7fafbceddc070fd5d9 (patch) | |
tree | 062d27a4fe9b86c5612bb33a32789f9e8123a825 /src | |
parent | de728ac3c06531f5c16fac65c505f0e63948ebe8 (diff) |
memif: coverity fix
Change-Id: I2b14e2a035a37b04816aac1e610146be58ad1e92
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/memif/memif.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c index 63f72a30de4..e8fb0e94a69 100644 --- 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; |