diff options
Diffstat (limited to 'vlib')
-rw-r--r-- | vlib/vlib/cli.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vlib/vlib/cli.c b/vlib/vlib/cli.c index 79db99f9632..5e959a78bf5 100644 --- a/vlib/vlib/cli.c +++ b/vlib/vlib/cli.c @@ -853,8 +853,11 @@ add_sub_command (vlib_cli_main_t * cm, uword parent_index, uword child_index) q = hash_get_mem (cm->parse_rule_index_by_name, sub_name); if (!q) - clib_error ("reference to unknown rule `%%%v' in path `%v'", - sub_name, c->path); + { + clib_error ("reference to unknown rule `%%%v' in path `%v'", + sub_name, c->path); + return; + } hash_set_mem (p->sub_rule_index_by_name, sub_name, vec_len (p->sub_rules)); |