summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/memif')
-rw-r--r--src/plugins/memif/memif_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/memif/memif_test.c b/src/plugins/memif/memif_test.c
index 510462ef6a8..e26094b82a8 100644
--- a/src/plugins/memif/memif_test.c
+++ b/src/plugins/memif/memif_test.c
@@ -482,6 +482,10 @@ vat_plugin_register (vat_main_t * vam)
/* Ask the vpp engine for the first assigned message-id */
name = format (0, "memif_%08x%c", api_version, 0);
mm->msg_id_base = vl_client_get_first_plugin_msg_id ((char *) name);
+ vec_free (name);
+
+ if (mm->msg_id_base == (u16) ~ 0)
+ return clib_error_return (0, "memif plugin not loaded...");
/* Get the control ping ID */
#define _(id,n,crc) \
@@ -493,8 +497,6 @@ vat_plugin_register (vat_main_t * vam)
if (mm->msg_id_base != (u16) ~ 0)
memif_vat_api_hookup (vam);
- vec_free (name);
-
return 0;
}