summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorYoann Desmouceaux <ydesmouc@cisco.com>2017-05-24 15:51:48 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-05-24 16:24:23 +0000
commit4227eefcd4ef4aa195bec4527d18f027fcc3815c (patch)
tree6a870dfb668968e297f150158d0c4d7809313783 /src/vlib
parent521202b445ea1d79e1b20d16e937ccfb0a1d2f6b (diff)
Fix tab-completion coverity issue
Change-Id: I051d015e7eee621dbef273b2c57449ea4c44b768 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
Diffstat (limited to 'src/vlib')
-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;
}