summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vlib/cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index 9e14bee219e..48cf0426488 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -333,7 +333,8 @@ done:
clib_bitmap_free (match_bitmap);
unformat_free (&input);
- vec_sort_with_function (result, vlib_cli_cmp_strings);
+ if (result)
+ vec_sort_with_function (result, vlib_cli_cmp_strings);
return result;
}