summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vtysh/vtysh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 72a15f24dd..6fdd7167ce 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -820,7 +820,8 @@ static int vtysh_rl_describe(void)
break;
case CMD_ERR_NO_MATCH:
cmd_free_strvec(vline);
- vector_free(describe);
+ if (describe)
+ vector_free(describe);
fprintf(stdout, "%% There is no matched command.\n");
rl_on_new_line();
return 0;