]> git.proxmox.com Git - mirror_frr.git/commitdiff
vtysh: null dereference (Coverity 1469896)
authorpaco <paco@voltanet.io>
Mon, 11 Jun 2018 17:42:03 +0000 (19:42 +0200)
committerpaco <paco@voltanet.io>
Mon, 11 Jun 2018 17:42:03 +0000 (19:42 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
vtysh/vtysh.c

index dd680cb9f43fc743d45e491b03668a45a9f6c670..63553469ddf57844cbc8e4ca5e0ba78a9e0255e5 100644 (file)
@@ -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;
                                }