]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: Fix leaked memory in error case
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 20 Apr 2018 15:46:19 +0000 (11:46 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 16 May 2018 13:56:16 +0000 (09:56 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vtysh/vtysh.c

index 9fff2ee58c4ee90091030551926c6112577b33cf..4974e538ea0789ec4a859cdd9323a3d0bd3bcb32 100644 (file)
@@ -341,6 +341,7 @@ static int vtysh_execute_func(const char *line, int pager)
 
        if (user_mode) {
                if (strncmp("en", vector_slot(vline, 0), 2) == 0) {
+                       cmd_free_strvec(vline);
                        fprintf(stdout, "%% Command not allowed: enable\n");
                        return CMD_WARNING;
                }