summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/virtio/vhost-user.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/vhost-user.c b/src/vnet/devices/virtio/vhost-user.c
index bde8106c501..f9bbae4f90f 100644
--- a/src/vnet/devices/virtio/vhost-user.c
+++ b/src/vnet/devices/virtio/vhost-user.c
@@ -2578,6 +2578,11 @@ vhost_user_create_if (vnet_main_t * vnm, vlib_main_t * vm,
int rv = 0;
int server_sock_fd = -1;
+ if (sock_filename == NULL || !(strlen (sock_filename) > 0))
+ {
+ return VNET_API_ERROR_INVALID_ARGUMENT;
+ }
+
if (is_server)
{
if ((rv =