]> git.puffer.fish Git - mirror/frr.git/commitdiff
[lib] Fix vector leak in error path in command.c, CID #38
authorPaul Jakma <paul.jakma@sun.com>
Thu, 15 Jun 2006 12:25:55 +0000 (12:25 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Thu, 15 Jun 2006 12:25:55 +0000 (12:25 +0000)
2006-06-15 Paul Jakma <paul.jakma@sun.com>

* command.c: (cmd_describe_command_real) Fix leak, CID #38.

lib/ChangeLog
lib/command.c

index 5d096364e058e87e1ece7b0ae4840383875ddb9c..b2ec068136778699a2861272b18afd2448cd8fb3 100644 (file)
@@ -1,3 +1,7 @@
+2006-06-15 Paul Jakma <paul.jakma@sun.com>
+
+       * command.c: (cmd_describe_command_real) Fix leak, CID #38.
+
 2006-05-28 Paul Jakma <paul.jakma@sun.com>
 
        * zebra.h: Include inttypes.h rather than stdint.h, best practice
index 07297effd4efe3ba8276fe082955908549939da8..316971e40e995ef175b55a7fa4fe05fc2f1fdcb1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   $Id: command.c,v 1.53 2006/05/12 23:24:09 paul Exp $
+   $Id$
  
    Command interpreter routine for virtual terminal [aka TeletYpe]
    Copyright (C) 1997, 98, 99 Kunihiro Ishiguro
@@ -1629,12 +1629,14 @@ cmd_describe_command_real (vector vline, struct vty *vty, int *status)
        if ((ret = is_cmd_ambiguous (command, cmd_vector, i, match)) == 1)
          {
            vector_free (cmd_vector);
+           vector_free (matchvec);
            *status = CMD_ERR_AMBIGUOUS;
            return NULL;
          }
        else if (ret == 2)
          {
            vector_free (cmd_vector);
+           vector_free (matchvec);
            *status = CMD_ERR_NO_MATCH;
            return NULL;
          }