aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dev/api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/dev/api.c')
-rw-r--r--src/vnet/dev/api.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/dev/api.c b/src/vnet/dev/api.c
index 260bc7b2e22..72811f5dee2 100644
--- a/src/vnet/dev/api.c
+++ b/src/vnet/dev/api.c
@@ -90,9 +90,10 @@ vnet_dev_api_attach (vlib_main_t *vm, vnet_dev_api_attach_args_t *args)
}
dev->description = dev_desc;
- for (vnet_dev_arg_t *a = driver->registration->args;
- a->type != VNET_DEV_ARG_END; a++)
- vec_add1 (dev->args, *a);
+ if (driver->registration->args)
+ for (vnet_dev_arg_t *a = driver->registration->args;
+ a->type != VNET_DEV_ARG_END; a++)
+ vec_add1 (dev->args, *a);
if (args->args)
{