From a0c14c54008777c9c437303eb690432bcc59ca3a Mon Sep 17 00:00:00 2001 From: paco Date: Mon, 11 Jun 2018 19:42:03 +0200 Subject: [PATCH] vtysh: null dereference (Coverity 1469896) Signed-off-by: F. Aragon --- vtysh/vtysh.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index dd680cb9f4..63553469dd 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -548,8 +548,10 @@ static int vtysh_execute_func(const char *line, int pager) line = "end"; vline = cmd_make_strvec(line); - if (vline == NULL && vty->is_paged) { - vty_close_pager(vty); + + if (vline == NULL) { + if (vty->is_paged) + vty_close_pager(vty); return CMD_SUCCESS; } -- 2.39.5