summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-11 19:42:03 +0200
committerpaco <paco@voltanet.io>2018-06-11 19:42:03 +0200
commita0c14c54008777c9c437303eb690432bcc59ca3a (patch)
tree5938ba186bad0ed056d0c57924209c99e47c51a2
parentMerge pull request #2298 from qlyoung/pipe-actions-vtysh (diff)
downloadfrr-a0c14c54008777c9c437303eb690432bcc59ca3a.tar.xz
frr-a0c14c54008777c9c437303eb690432bcc59ca3a.zip
vtysh: null dereference (Coverity 1469896)
Signed-off-by: F. Aragon <paco@voltanet.io>
-rw-r--r--vtysh/vtysh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index dd680cb9f..63553469d 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;
}