From 4227eefcd4ef4aa195bec4527d18f027fcc3815c Mon Sep 17 00:00:00 2001 From: Yoann Desmouceaux Date: Wed, 24 May 2017 15:51:48 +0200 Subject: Fix tab-completion coverity issue Change-Id: I051d015e7eee621dbef273b2c57449ea4c44b768 Signed-off-by: Yoann Desmouceaux --- src/vlib/cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit 1.2.3-korg