aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/memif/memif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index 42325dfd7c0..c01b8dc98fa 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -682,8 +682,8 @@ memif_socket_filename_add_del (u8 is_add, u32 sock_id, u8 * sock_filename)
vec_add1 (dir, '\0');
}
- if (((stat (dir, &file_stat) == -1) || (!S_ISDIR (file_stat.st_mode)))
- && (idx != 0))
+ if (((dir == 0) || (stat (dir, &file_stat) == -1)
+ || (!S_ISDIR (file_stat.st_mode))) && (idx != 0))
{
vec_free (dir);
return VNET_API_ERROR_INVALID_ARGUMENT;